looping cells though a named range
On Tue, 19 Aug 2003 16:05:43 -0700, "Jo" wrote:
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
---------------------------------------------------------
Hank Scorpio
scorpionet who hates spam is at iprimus.com.au (You know what to do.)
* Please keep all replies in this Newsgroup. Thanks! *
|