I have relly got weird problem with the attached sheet. I set up a last row and try to loop through from 1 to last row. For some unknow reason, the last row shows the correct result,but when it loops throught, instead of looping from 1 to 24, the loop stops at 1, or 2. To test my syntax, I set up a different module and tests it using msgboxes. The magboxes show the corrrect result,but if I use the same syntax on the actual sheet, the loop stops at 1, or 2.
With Worksheets("Sheet1")
LR2 = .Cells(.Rows.Count, 2).End(xlUp).Row
For Y = 1 To LR2
MsgBox Y
The last row, ie LR2 is 24, but when it loops from 1 to LR2, instead of giving the result of 1 to 24, I have got 1 to 1.
I am sure, There is an error on the above line, but having done a test, I am unable to see it. Please a person with eye for details help.
Bookmarks