Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default looping cells though a named range

Hi
Can anyone give me an example of looping cells though a
named range.
Thanks
Jo
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default 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! *
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Looping thru a range of cells COBOL Dinosaur New Users to Excel 9 June 2nd 07 03:41 AM
Copy cells from named range Melissa Excel Discussion (Misc queries) 2 January 19th 07 08:27 PM
Copy cells from named range Melissa Excel Discussion (Misc queries) 0 January 19th 07 08:15 PM
Array as a "named range" - formula ok in cells, but error as "named range" tskogstrom Excel Discussion (Misc queries) 11 December 28th 06 04:44 PM
inserting a named range into new cells based on a named cell Peter S. Excel Discussion (Misc queries) 1 June 4th 06 03:53 AM


All times are GMT +1. The time now is 01:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"