Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default refer to sequential sheets in a formula

I have 100 sheets in a workbook, with each sheet named "1" to "100"
sequentially. In a summary sheet, I want to include a formula that refers to
a range of cells in each sheet separately (i.e. each sheet sequentially
rather than all sheets together).

I have created a countif formula in cell A1 on my summary sheet that counts
the number of entries in a defined range on sheet 1. I then want to pull down
this formula such that Cell A2 counts from the same defined range in sheet 2
and so on. That is, I want the range of cells to stay the same, but the sheet
name to change (to the next sheet in the workbook) when I drag down the
formula. Any pointers would be helpful.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default refer to sequential sheets in a formula

Suppose you had this in A1:
=COUNTIF('1'!A1:A5,"=5")

Replace the above with this instead, in A1:
=COUNTIF(INDIRECT("'"&ROW(A1)&"'!A1:A5"),"=5")
Then just copy A1 down 100 rows to A100 to extract the required results from
each of the 100 sheets named as: 1,2,3, ... 100

Note that the same formula above [ie with ROW(A1)] should be used in any
starting cell, if it's other than A1. ROW(A1) is the incrementer part within
the formula. Adapt to suit.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"seanoniallain" wrote:
I have 100 sheets in a workbook, with each sheet named "1" to "100"
sequentially. In a summary sheet, I want to include a formula that refers to
a range of cells in each sheet separately (i.e. each sheet sequentially
rather than all sheets together).

I have created a countif formula in cell A1 on my summary sheet that counts
the number of entries in a defined range on sheet 1. I then want to pull down
this formula such that Cell A2 counts from the same defined range in sheet 2
and so on. That is, I want the range of cells to stay the same, but the sheet
name to change (to the next sheet in the workbook) when I drag down the
formula. Any pointers would be helpful.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default refer to sequential sheets in a formula

Thanks Max! This works.

"Max" wrote:

Suppose you had this in A1:
=COUNTIF('1'!A1:A5,"=5")

Replace the above with this instead, in A1:
=COUNTIF(INDIRECT("'"&ROW(A1)&"'!A1:A5"),"=5")
Then just copy A1 down 100 rows to A100 to extract the required results from
each of the 100 sheets named as: 1,2,3, ... 100

Note that the same formula above [ie with ROW(A1)] should be used in any
starting cell, if it's other than A1. ROW(A1) is the incrementer part within
the formula. Adapt to suit.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"seanoniallain" wrote:
I have 100 sheets in a workbook, with each sheet named "1" to "100"
sequentially. In a summary sheet, I want to include a formula that refers to
a range of cells in each sheet separately (i.e. each sheet sequentially
rather than all sheets together).

I have created a countif formula in cell A1 on my summary sheet that counts
the number of entries in a defined range on sheet 1. I then want to pull down
this formula such that Cell A2 counts from the same defined range in sheet 2
and so on. That is, I want the range of cells to stay the same, but the sheet
name to change (to the next sheet in the workbook) when I drag down the
formula. Any pointers would be helpful.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default refer to sequential sheets in a formula

Good to hear that. Thanks for feeding back.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"seanoniallain" wrote in message
...
Thanks Max! This works.



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
Is it possible? DakotaNJ Excel Worksheet Functions 25 September 18th 06 09:30 PM
Reusing formula Tony29 Excel Discussion (Misc queries) 7 September 7th 06 03:34 AM
Dynamic Range with unused formula messing up x axis on dynamic graph [email protected] Charts and Charting in Excel 2 February 2nd 06 08:02 PM
Match then lookup Tenacity Excel Worksheet Functions 9 December 3rd 05 05:30 AM
How do I make a formula refer to given data even if I do a sort f. keithpt Excel Discussion (Misc queries) 0 March 17th 05 10:20 PM


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