View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson[_4_] Jim Thomlinson[_4_] is offline
external usenet poster
 
Posts: 1,119
Default For Each offset range

Sub DoStuffForMike()
Dim rngToSearch As Range
Dim rngCurrent As Range
Dim wks As Worksheet

Set wks = Sheets("Sheet1")
Set rngToSearch = wks.Range("I2", wks.Range("I65535").End(xlUp))
For Each rngCurrent In rngToSearch
If rngCurrent.Value 0 Then
MsgBox "Do stuff for Mike with " & rngCurrent.Address
End If
Next rngCurrent

End Sub
--
HTH...

Jim Thomlinson


"Michael Smith" wrote:

Please help! I need to "do stuff" if column I is greater than 0...but
this isn't working.

Dim ws1 As Worksheet
For Each row In ws1
If Range.Offset(0, 9).Text 0 Then
do stuff
End If
Next

Thanks!
Mike


*** Sent via Developersdex http://www.developersdex.com ***