Thread: Looping
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
J.E. McGimpsey J.E. McGimpsey is offline
external usenet poster
 
Posts: 493
Default Looping

One way:

Dim cell As Range
Set cell = Range("A1")
Do Until IsEmpty(cell.value)
'do something
Set cell = cell.offset(1, 0)
Loop

In article ,
Darrel wrote:

I would like to execute my macro until it encounters an empty cell. How can
I check for an empty cell in a macro?