Hi,
I have a list lengthy macro that populates several cells in a row (column A - E) based off the value in column F. I need all these steps to be repeated for the following row, and have this loop continue until there is no value in column F. How do I have a loop do this within the macro?
To simplify it, here are the steps to populate the cells in column A and B.
Range("A1").End(xlDown).Offset(1, 0).Select
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC[6],'[First data.xlsm]Monthly.rpt'!data,2,FALSE)"
Range("B1").Select
Range("B1").End(xlDown).Offset(1, 0).Select
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC[5],'[First data.xlsm]Monthly.rpt'!data,5,FALSE)"
How do I have these two steps loop for the next row, etc until there is no more data in column F?
Thanks in advance for your help.
Robbie
Bookmarks