Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Looping through named ranges


I would like to loop through named ranges in a particular worksheet. Is
there a way to do this. Something like

Dim MyRange As Range
For each MyRange in ThisWorkbook.Worksheets("Sheet1").Ranges
.....Do something....
Next MyRange


however, this of course, doesn't work.

Any ideas?


--
JFamilo
------------------------------------------------------------------------
JFamilo's Profile: http://www.excelforum.com/member.php...o&userid=17276
View this thread: http://www.excelforum.com/showthread...hreadid=396243

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Looping through named ranges

Dim nm as Name
for each nm in ThisworkbookNames

or

for each nm in Thisworkbook.Worksheets(1).Names

for just sheet level names.

--
Regards,
Tom Ogilvy

"JFamilo" wrote in
message ...

I would like to loop through named ranges in a particular worksheet. Is
there a way to do this. Something like

Dim MyRange As Range
For each MyRange in ThisWorkbook.Worksheets("Sheet1").Ranges
....Do something....
Next MyRange


however, this of course, doesn't work.

Any ideas?


--
JFamilo
------------------------------------------------------------------------
JFamilo's Profile:

http://www.excelforum.com/member.php...o&userid=17276
View this thread: http://www.excelforum.com/showthread...hreadid=396243



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Looping through named ranges


Thanks! This really helps!


--
JFamilo
------------------------------------------------------------------------
JFamilo's Profile: http://www.excelforum.com/member.php...o&userid=17276
View this thread: http://www.excelforum.com/showthread...hreadid=396243

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
Like 123, allow named ranges, and print named ranges WP Excel Discussion (Misc queries) 1 April 8th 05 06:07 PM
Deleting named ranges by looping through range collection agarwaldvk[_11_] Excel Programming 3 August 3rd 04 01:00 AM
named ranges - changing ranges with month selected gr8guy Excel Programming 2 May 28th 04 04:50 AM
Looping through named ranges Tim[_38_] Excel Programming 1 May 10th 04 07:20 PM
looping cells though a named range Jo[_4_] Excel Programming 1 August 20th 03 12:32 AM


All times are GMT +1. The time now is 12:00 PM.

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"