Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
repeat macro until empty space in next column
Assume two columns. I want to perform an operation on a cell in the first
column and then repeat that operation on the cell below as long as there is at least one character in the second column. When the second column is blank the operation stops. I set up a macro to perform the operation and move down one cell. Now I want to check the second column and repeat the macro until a blank cell is reached. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
repeat macro until empty space in next column
Try something like this... replace ActiveCell.Offset(i,0) = "a" with the
operation you are looking to perform: Sub repeat() i = 0 Range("A1").Select While (ActiveCell.Offset(i, 1) < "") ActiveCell.Offset(i, 0) = "a" i = i + 1 Wend End Sub -- Regards, Dave "Sabba Efie" wrote: Assume two columns. I want to perform an operation on a cell in the first column and then repeat that operation on the cell below as long as there is at least one character in the second column. When the second column is blank the operation stops. I set up a macro to perform the operation and move down one cell. Now I want to check the second column and repeat the macro until a blank cell is reached. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
insert date | Excel Worksheet Functions | |||
Need to Improve Code Copying/Pasting Between Workbooks | Excel Discussion (Misc queries) | |||
Macro to open workbook and copy and paste values in to orig workbo | Excel Worksheet Functions | |||
Closing File Error | Excel Discussion (Misc queries) | |||
Find a empty cell in next column | Excel Discussion (Misc queries) |