View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Charles Chickering Charles Chickering is offline
external usenet poster
 
Posts: 272
Default repeat macro through cell until first blank

here's one simple way assuming your macro operates based on the active cell:
Sub YourSub()
Do
'YourStuff
ActiveCell.Offset(1).Select
Loop Until ActiveCell = ""
--
Charles Chickering

"A good example is twice the value of good advice."


"william" wrote:

I am running a macro through one specific column of my spreadsheet. From cell
B4 to anywhere from B20 or higher, to be exact. I need to add something to my
code so that my macro will execute in each cell moving down that column until
it encounters the first blank cell. At that point it should stop altogether,
doing nothing with the blank cell.

Any suggestions?