IF THEN LOOP WHICH ENDS WHEN A COLUMNS NEXT CELL IS BLANK


Posted by Kristian Fern on February 15, 2002 7:50 AM

I'm trying to make a logical loop in VBA that will copy a label in column list and paste it to a specific cell which I use as key for Vlookups. I need to copy paste each of label's in my list (column), recalculating and printing the report, until the next cell in this column is blank. I stuck trying to get the macro to move down 1 row until the blank condition has been met. In lotus I can do this with the following statement: {Down}
{if @cellpointer("type")="b"}{beep}{edit-goto $a:$a$36}{quit}. HELP!!



Posted by JohnG on February 15, 2002 11:21 AM

Try

Dim FRow as integer

sub xx
FRow=1
do while Range("A" & FRow).value<>""
'copy paste code
FRow=FRow+1
loop