nested while not working any more...

  • Thread starter Thread starter criminalspeed
  • Start date Start date
C

criminalspeed

This works in Excel 2002, but fails at the second "while" in Excel
2003....


Range("n50").Select
target = -3
j = 12
K = 36
Cells(j, 1).Select
Reading = ActiveCell
Cells(j, 4).Select
ActiveCell.FormulaR1C1 = Reading
Cells(j, 1).Select
While ((target <= -2.5) And (j < 500))

While (((Reading - target) <> 0) And (Not (Reading = "")))
j = j + 1
Cells(j, 1).Select
Reading = ActiveCell
Cells(j, 3).Select
ActiveCell.FormulaR1C1 = Reading
Cells(j, 2).Select
CLD = ActiveCell
Cells(j, 1).Select

Wend
Cells(K, 18).Select
ActiveCell.FormulaR1C1 = CLD
K = K + 1
target = target + 1
j = 12
Wend


________________________________________________
TIA,
Crim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top