Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Code for naming worksheet name range??

Hello!

I have a workbook with five sheets (left to right) named
with text names, then a sheet named AREA, followed by
various sheets whose tabs(names) are numbers. The AREA
sheet is a summary sheet and consists of many formulas
such as SUM('16:56'!E6), referring to the sum of E6 in
Sheets 16, 23, 25, 20 and 56.

I need to copy this workbook about 50 times and plug in
numbered sheet tabs that are different than the original
workbook (all text-named sheets remain the same).

The thought just occurred to me that I am going to have to
physically change each formula to correspond to the new
workbook's new sheet numbers! Yikes!

Is there a more generic way I can write a formula so
that it will, for instance, sum the cells in all the
sheets after "AREA" or some kind of code that can be used
in conjunction with the formula that only takes a cell
value from the numbered worksheets ... or something?

Any help will be greatly appreciated!

Sandy


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default Code for naming worksheet name range??

Hi Sandy,

There is a very good technique for this kind of problem, but it only
works if all of your formulas refer to all of the numbered sheets. Add an
empty worksheet right in front of the first numbered worksheet. Give this
worksheet the sheet tab name First. Add another empty worksheet after the
very last numbered worksheet and name it Last.

Once you've done this you can change all of the formulas on your AREA
sheet to look like this:

=SUM(First:Last!A1)

This method allows you to rename, add, and remove any of the worksheets
between First and Last without having to update the formula. You can hide
these two sheets so they don't affect the appearance of the workbook. Just
make sure that they stay blank so they don't change the values of the
formulas.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


"Sandy" wrote in message
...
Hello!

I have a workbook with five sheets (left to right) named
with text names, then a sheet named AREA, followed by
various sheets whose tabs(names) are numbers. The AREA
sheet is a summary sheet and consists of many formulas
such as SUM('16:56'!E6), referring to the sum of E6 in
Sheets 16, 23, 25, 20 and 56.

I need to copy this workbook about 50 times and plug in
numbered sheet tabs that are different than the original
workbook (all text-named sheets remain the same).

The thought just occurred to me that I am going to have to
physically change each formula to correspond to the new
workbook's new sheet numbers! Yikes!

Is there a more generic way I can write a formula so
that it will, for instance, sum the cells in all the
sheets after "AREA" or some kind of code that can be used
in conjunction with the formula that only takes a cell
value from the numbered worksheets ... or something?

Any help will be greatly appreciated!

Sandy




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Code for naming worksheet name range??

Hi Rob,

Cool! Thank you so much!

Sandy

-----Original Message-----
Hi Sandy,

There is a very good technique for this kind of

problem, but it only
works if all of your formulas refer to all of the

numbered sheets. Add an
empty worksheet right in front of the first numbered

worksheet. Give this
worksheet the sheet tab name First. Add another empty

worksheet after the
very last numbered worksheet and name it Last.

Once you've done this you can change all of the

formulas on your AREA
sheet to look like this:

=SUM(First:Last!A1)

This method allows you to rename, add, and remove any of

the worksheets
between First and Last without having to update the

formula. You can hide
these two sheets so they don't affect the appearance of

the workbook. Just
make sure that they stay blank so they don't change the

values of the
formulas.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


"Sandy" wrote in message
...
Hello!

I have a workbook with five sheets (left to right) named
with text names, then a sheet named AREA, followed by
various sheets whose tabs(names) are numbers. The AREA
sheet is a summary sheet and consists of many formulas
such as SUM('16:56'!E6), referring to the sum of E6 in
Sheets 16, 23, 25, 20 and 56.

I need to copy this workbook about 50 times and plug in
numbered sheet tabs that are different than the original
workbook (all text-named sheets remain the same).

The thought just occurred to me that I am going to have

to
physically change each formula to correspond to the new
workbook's new sheet numbers! Yikes!

Is there a more generic way I can write a formula so
that it will, for instance, sum the cells in all the
sheets after "AREA" or some kind of code that can be

used
in conjunction with the formula that only takes a cell
value from the numbered worksheets ... or something?

Any help will be greatly appreciated!

Sandy




.

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
Code Help for naming a worksheet tab Very Basic User Excel Discussion (Misc queries) 3 November 11th 09 12:21 PM
Naming a reference table for use in a VBA Code CAT Excel Discussion (Misc queries) 4 October 2nd 08 01:36 PM
Range naming Squeaky Excel Discussion (Misc queries) 2 December 29th 06 09:10 PM
Naming Sheets using a range in another worksheet gazza Excel Worksheet Functions 3 September 19th 06 01:02 PM
protection de-activating tab-naming code Stilla Excel Worksheet Functions 2 May 23rd 06 05:21 PM


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