Good evening all,
I am trying to run a basic IF condition with a loop. But VBA is giving some unexpected results.
See data below, if the data columns become misaligned, then my sincere apologies.
If Distribution channel is 99, I want Comments to say "No Door". If Distribution channel is 0, I want comments to say "Door". Please note the top left "cell" is with 0 value is cell Y3, which is the starting point for my code.
Door Distribution Channel Comments
0 99
960353 0
960353 0
960673 0
960673 0
0 99
0 99
Please Login or Register to view this content.
For some strange reason, this sub routine changes the value of the distribution channel to value 0, instead of testing whether the value is 0 or 99. This is the outcome of the sub routine.
Door Distribution Channel Comments
0 0 Door
960353 0 Door
960353 0 Door
960673 0 Door
960673 0 Door
0 0 Door
0 0 Door
Could anyone please explain why it is changing the value of the distribution channel instead of testing it? Many thanks!
Bookmarks