Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default How to modigy the reference in a named range?

I have a worksheet for Financial Reporting called FR2(n) - where n can be
from 1 to 15. A new sheet is generated at the end of the previous reporting
period. I need to pick up 8 'total' rows from the latest sheet and copy them
into an analysis sheet. So I created sheet FR2(1) and made 8 named ranges
for the totals.

Of course the Names Manager shows that the range only refers to the FR2(1)
sheet. When I create the new FR2(2) sheet the named ranges are there but
they refer to RP2(1).

How can I modify the named range sheet references to be the new RP2(2) (etc)
target.

Thanks.

Rick

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to modigy the reference in a named range?


The names ranges are a workbook object and you can't tell which named
range is on which sheet. You can change the name range using the
replace method like this

For Each nm In ThisWorkbook.Names
nm.RefersTo = Replace(nm.RefersTo, "Sheet1", "Sheet2")
Next nm


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=147605

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default How to modigy the reference in a named range?

Thank you Joel.
.... Rick


"joel" wrote in message
...

The names ranges are a workbook object and you can't tell which named
range is on which sheet. You can change the name range using the
replace method like this

For Each nm In ThisWorkbook.Names
nm.RefersTo = Replace(nm.RefersTo, "Sheet1", "Sheet2")
Next nm


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
View this thread:
http://www.thecodecage.com/forumz/sh...d.php?t=147605


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
reference named range Michael[_4_] Excel Programming 2 August 18th 09 04:27 PM
Combox Box - Need to Reference Named Range Benjamin Excel Programming 2 August 17th 09 08:21 PM
Can I change the reference to a named range via VBA? Bassman62 Excel Programming 7 March 22nd 09 05:52 PM
automatic range - named range give me circular reference... George Thorogood Excel Discussion (Misc queries) 0 February 22nd 07 07:53 PM
Reference a named range John M.[_3_] Excel Programming 2 October 8th 05 07:42 AM


All times are GMT +1. The time now is 03:07 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"