macropadawan
New Member
- Joined
- Aug 19, 2017
- Messages
- 4
Hi folks,
I am trying to test 2 criteria sequentially before looping a macro. The 1st one works fine, but Im having some trouble getting the second test to work. Here is a snippet of the code (which works) prior to adding the second test:
Do While test <> True
k = k + Increment
ActiveSheet.Cells(56 + j, 17).Value = k
test = ActiveSheet.Cells(57 + j, 13).Value
Loop
I would like to add the following line of code prior to the loop:
test = ActiveSheet.Cells(57 + j, 37).Value
When I tried the following code it did not pick it up:
Do While test <> True
k = k + Increment
ActiveSheet.Cells(56 + j, 17).Value = k
test = ActiveSheet.Cells(57 + j, 13).Value
test = ActiveSheet.Cells(57 + j, 37).Value
Loop
What am I doing wrong here?
Thanks!
I am trying to test 2 criteria sequentially before looping a macro. The 1st one works fine, but Im having some trouble getting the second test to work. Here is a snippet of the code (which works) prior to adding the second test:
Do While test <> True
k = k + Increment
ActiveSheet.Cells(56 + j, 17).Value = k
test = ActiveSheet.Cells(57 + j, 13).Value
Loop
I would like to add the following line of code prior to the loop:
test = ActiveSheet.Cells(57 + j, 37).Value
When I tried the following code it did not pick it up:
Do While test <> True
k = k + Increment
ActiveSheet.Cells(56 + j, 17).Value = k
test = ActiveSheet.Cells(57 + j, 13).Value
test = ActiveSheet.Cells(57 + j, 37).Value
Loop
What am I doing wrong here?
Thanks!