View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default For Each Row in Named Range

Will,

Dim myRow As Range

For Each myRow In Range("Fred").Rows
If Intersect(Range("B:B"), myRow).Value = 1 And _
Intersect(Range("D:D"), myRow).Value <= 5 Then
MsgBox "Hello from row " & myRow.Row
End If
Next myRow


HTH,
Bernie
MS Excel MVP


"wpiet" wrote in message
...
What is the simplest syntax to use to accomplish the following?:

For Each Row in [NamedRange]
If the value in column B = 1 and the value in column D <= [SomeValue] Then
.
.
.
End If
Next Row

Thanks,
--
Will