View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Excel_VBA_Newb Excel_VBA_Newb is offline
external usenet poster
 
Posts: 13
Default Advance in a cell range using VBA

Sorry, I wasn't very clear. What if I want to force the advancement to the
next cell (rather than waiting for the for loop to iterate)

"jasontferrell" wrote:

The "next" command at the end of your code causes the cell to
increment. You can just use it like this:

For Each myCell in myRange.Cells
'do something with the cell here, like this:
if myCell.value=0 then
myCell.value = "new value"
end if
Next myCell