tomtom91
01-16-2023, 06:59 AM
I have a sorting going on that looks like this
If istArray(k, 4) > sollArray(l, 4) Then
'Ist > soll -> soll first
finalArray(i, 1) = sollArray(l, 1)
finalArray(i, 4) = sollArray(l, 2)
finalArray(i, 5) = sollArray(l, 3)
l = l + 1
Else 'Ist < soll -> ist first
finalArray(i, 1) = istArray(k, 1)
finalArray(i, 2) = istArray(k, 2)
finalArray(i, 3) = istArray(k, 3)
k = k + 1
End If
For k = 1 I got the Word "ERR_BSUP_EL_OC" in istArray and for l = 1 the word "ERR_BSU_STELPMPDFCT" in sollArray. Both are written in uppercase (UCASE()) to be sure to compare correctly. When I hover over the variables in Visual Basics I see these entries getting compared. istArray should be greater > than sollArray. Therefor the first part should be activated. But it doesn't! The second part after the else gets triggered. I don't get why.
If I use Excels IF("ERR_BSUP_EL_OC">"ERR_BSU_STELPMPDFCT_VW";"Yes";"No") in Excel directly it even says "yes". What am I missing here? :banghead:
BTW the sorting works superb except for these two inputs, where the sorting gets "out of line".
If istArray(k, 4) > sollArray(l, 4) Then
'Ist > soll -> soll first
finalArray(i, 1) = sollArray(l, 1)
finalArray(i, 4) = sollArray(l, 2)
finalArray(i, 5) = sollArray(l, 3)
l = l + 1
Else 'Ist < soll -> ist first
finalArray(i, 1) = istArray(k, 1)
finalArray(i, 2) = istArray(k, 2)
finalArray(i, 3) = istArray(k, 3)
k = k + 1
End If
For k = 1 I got the Word "ERR_BSUP_EL_OC" in istArray and for l = 1 the word "ERR_BSU_STELPMPDFCT" in sollArray. Both are written in uppercase (UCASE()) to be sure to compare correctly. When I hover over the variables in Visual Basics I see these entries getting compared. istArray should be greater > than sollArray. Therefor the first part should be activated. But it doesn't! The second part after the else gets triggered. I don't get why.
If I use Excels IF("ERR_BSUP_EL_OC">"ERR_BSU_STELPMPDFCT_VW";"Yes";"No") in Excel directly it even says "yes". What am I missing here? :banghead:
BTW the sorting works superb except for these two inputs, where the sorting gets "out of line".