Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 176
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
insert date Larry Excel Worksheet Functions 28 July 15th 06 02:41 AM
Need to Improve Code Copying/Pasting Between Workbooks David Excel Discussion (Misc queries) 1 January 6th 06 03:56 AM
Macro to open workbook and copy and paste values in to orig workbo Dena X Excel Worksheet Functions 1 December 15th 05 11:13 PM
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
Find a empty cell in next column Michael Excel Discussion (Misc queries) 3 June 15th 05 02:18 PM


All times are GMT +1. The time now is 10:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"