Thread: Help with Loop
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
JMay JMay is offline
external usenet poster
 
Posts: 422
Default Help with Loop

Thanks guys, for your help
I better understand what I was not doing (right)..


"Berend Botje " wrote in
message ...
Sub TryAgain()

Dim myCell As Range, rng As Range

Set rng = Range("B1:B10")

For Each myCell In rng
If myCell = 0 and not isempty(mycell) Then
myCell.Offset(0, 1).Value = "LOW"
Else: myCell.Offset(0, 1).Value = "" '<==
End If
Next myCell

End Sub

Added a line to delete any "LOW" texts that are already there when
script is started.


---
Message posted from http://www.ExcelForum.com/