Hi,
Why does the Or-function not work here?
Dim j As Integer
j = 3
Do While Cells(j, 10).Value = “001” Or “002”
Cells(j, 2).Value = “400”
j = j + 1
Loop
Column 10 looks like the following:
001
002
101
102
103
So column 2 should look like the following:
400
400
‘Empty’
‘Empty’
‘Empty’
It should stop at 101
But column 2 looks now like the following and that is wrong:
400
400
400
400
400
400
Till infinity
Excel freezes and crashes
Site note: the cells are all ‘text’-formattypes.
So 001 is text not a number. (Selection.NumberFormat=“@“)
Please help me
Thank you!
Why does the Or-function not work here?
Dim j As Integer
j = 3
Do While Cells(j, 10).Value = “001” Or “002”
Cells(j, 2).Value = “400”
j = j + 1
Loop
Column 10 looks like the following:
001
002
101
102
103
So column 2 should look like the following:
400
400
‘Empty’
‘Empty’
‘Empty’
It should stop at 101
But column 2 looks now like the following and that is wrong:
400
400
400
400
400
400
Till infinity
Excel freezes and crashes
Site note: the cells are all ‘text’-formattypes.
So 001 is text not a number. (Selection.NumberFormat=“@“)
Please help me
Thank you!