Advance in a cell range using VBA
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
|