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 |
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 |
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 |
All times are GMT +1. The time now is 01:19 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com