looping cells though a named range

  • Thread starter Thread starter Jo
  • Start date Start date
Hi
Can anyone give me an example of looping cells though a
named range.
Thanks
Jo

In the example below, MyRange is a range name defined as
=Sheet1!$A$1:$A$11

Sub LoopThroughRange()

Dim rng As Excel.Range

For Each rng In ActiveSheet.Range("myrange")

Debug.Print rng.Value

Next

End Sub
 
Back
Top