LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 117
Default Generic Worksheet Names

Hi all, I hope someone would be able to help me with my question.
I have a workbook containing 5 worksheets: Main Sheet, July, June, May,
April. In each of these worksheets I defined a couple of ranges using
InsertNameDefine. These ranges are Range1 and Range2.
In the Main Sheet I have a formula that refers to values located in the next
adjacent 3 worksheets (July, June, May) as follows:

= SUMPRODUCT(--(July!Range1 = whatever),--(July!Range2 = whatever)) +
SUMPRODUCT(--(June!Range1 = wahetever),--(June!Range2= whatever)) +
SUMPRODUCT(--(May!Range1 = whatever),--(May!Range2= whatever))

In the above formula, I want to refer to the 3 worksheets July, June and May
by their generic name (i.e. Sheet2, Sheet3 and Sheet4) not by the name I
assigned to them.

The reason is that I have a macro code that enables users to add one new
worksheet at the beginning of each month. So on August 1st, a new worksheet
(called August) will be created after Main Sheet. Therefore, August will
become Sheet2 and July will then become Sheet3 as it will be shifted one
step to the right. And the formula in the Main Sheet should then refer to the
next 3 adjacent worksheets regardless of their names, in this case August,
July, June.

Im using Excel 2003.
Thanks in advance
Tendresse
 
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
Generic reference in a Macro Harry's GMail World Excel Discussion (Misc queries) 2 April 17th 07 11:07 PM
Open Outlook with generic message jamphan Excel Discussion (Misc queries) 0 March 28th 06 03:59 PM
HOW TO RETRIVE LAST NAME USING EXCEL, IT SHOULD BE GENERIC zomex Excel Worksheet Functions 5 November 29th 05 03:36 PM
Creation of a Generic Macro Sondra Excel Worksheet Functions 1 September 13th 05 10:40 PM
How to link Excel worksheet tab names to dates in each worksheet? Pat Excel Worksheet Functions 9 January 31st 05 07:51 AM


All times are GMT +1. The time now is 06:58 AM.

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

About Us

"It's about Microsoft Excel"