#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 184
Default Dynamic Sum

Hello. I have 5 sheets (named Sheet1 though Sheet5). On an input
sheet, I wrote sheet1 though sheet5 in cells A2:A6, with a 1 or 0 in
column B. Is there a way sum cell A1 in each of the sheets that have
a 1 next to it in column B?

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 303
Default Dynamic Sum

One way,

=IF(B2=1,Sheet1!A1,0)+IF(B3=1,Sheet2!A1,0)+IF(B4=1 ,Sheet3!A1,0)+IF(B5=1,Sheet4!A1,0)+IF(B6=1,Sheet5! A1,0)

Greetings from New Zealand

"Steve" wrote in message
oups.com...
Hello. I have 5 sheets (named Sheet1 though Sheet5). On an input
sheet, I wrote sheet1 though sheet5 in cells A2:A6, with a 1 or 0 in
column B. Is there a way sum cell A1 in each of the sheets that have
a 1 next to it in column B?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Dynamic Sum

If you only have a "few" sheets then I would probably use Bill's suggestion.

If you have "a lot" of sheets then this will work:

Give your list of sheet names a defined name. Something like sNames.

Then:

=SUMPRODUCT(SUMIF(OFFSET(B2,ROW(B2:B6)-MIN(ROW(B2:B6)),),1,INDIRECT("'"&sNames&"'!A1")))

Biff

"Steve" wrote in message
oups.com...
Hello. I have 5 sheets (named Sheet1 though Sheet5). On an input
sheet, I wrote sheet1 though sheet5 in cells A2:A6, with a 1 or 0 in
column B. Is there a way sum cell A1 in each of the sheets that have
a 1 next to it in column B?



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 184
Default Dynamic Sum

Hi Biff. Thanks so much for the response. I hate to sound dumb, but
can you elaborate a little? How do I create a defined name for all
the sheets? And do I create it for ALL the sheet names?

Thanks Biff!!


On Apr 5, 5:11 pm, "T. Valko" wrote:
If you only have a "few" sheets then I would probably use Bill's suggestion.

If you have "a lot" of sheets then this will work:

Give your list of sheet names a defined name. Something like sNames.

Then:

=SUMPRODUCT(SUMIF(OFFSET(B2,ROW(B2:B6)-MIN(ROW(B2:B6)),),1,INDIRECT("'"&sNa*mes&"'!A1")))

Biff

"Steve" wrote in message

oups.com...



Hello. I have 5 sheets (named Sheet1 though Sheet5). On an input
sheet, I wrote sheet1 though sheet5 in cells A2:A6, with a 1 or 0 in
column B. Is there a way sum cell A1 in each of the sheets that have
a 1 next to it in column B?- Hide quoted text -


- Show quoted text -



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 184
Default Dynamic Sum

Biff,

Disregard previous post. I got it! I have one follow up question if
I may - is it possible to make the cell being summed (in this case A1)
dynamic as well? Meaning, if I copy the formula down one row, can I
get it to sum cell B1? Thanks!



On Apr 5, 5:11 pm, "T. Valko" wrote:
If you only have a "few" sheets then I would probably use Bill's suggestion.

If you have "a lot" of sheets then this will work:

Give your list of sheet names a defined name. Something like sNames.

Then:

=SUMPRODUCT(SUMIF(OFFSET(B2,ROW(B2:B6)-MIN(ROW(B2:B6)),),1,INDIRECT("'"&sNa*mes&"'!A1")))

Biff

"Steve" wrote in message

oups.com...



Hello. I have 5 sheets (named Sheet1 though Sheet5). On an input
sheet, I wrote sheet1 though sheet5 in cells A2:A6, with a 1 or 0 in
column B. Is there a way sum cell A1 in each of the sheets that have
a 1 next to it in column B?- Hide quoted text -


- Show quoted text -





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Dynamic Sum

OK....

Assume on your Input sheet you have:

A2 = Sheet1
A3 = Sheet2
A4 = Sheet3
A5 = Sheet4
A6 = Sheet5

Select the range A2:A6
Click in the Name box (that box directly above the "A" in column A) and type
in a name for that range. I used the name sNames in my example. sNames for
sheet names.

That's the easy way to assign a name to range. Another way:

Goto the menu InsertNameDefine
Names in workbook: type the name in he sNames
Refers to: =Input!$A$2:$A$6
OK out

Biff

"Steve" wrote in message
oups.com...
Hi Biff. Thanks so much for the response. I hate to sound dumb, but
can you elaborate a little? How do I create a defined name for all
the sheets? And do I create it for ALL the sheet names?

Thanks Biff!!


On Apr 5, 5:11 pm, "T. Valko" wrote:
If you only have a "few" sheets then I would probably use Bill's
suggestion.

If you have "a lot" of sheets then this will work:

Give your list of sheet names a defined name. Something like sNames.

Then:

=SUMPRODUCT(SUMIF(OFFSET(B2,ROW(B2:B6)-MIN(ROW(B2:B6)),),1,INDIRECT("'"&sNa*mes&"'!A1")))

Biff

"Steve" wrote in message

oups.com...



Hello. I have 5 sheets (named Sheet1 though Sheet5). On an input
sheet, I wrote sheet1 though sheet5 in cells A2:A6, with a 1 or 0 in
column B. Is there a way sum cell A1 in each of the sheets that have
a 1 next to it in column B?- Hide quoted text -


- Show quoted text -




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Dynamic Sum

if I copy the formula down one row, can I
get it to sum cell B1?


Do you mean if you copy it *across* a row?

Ok, now you're getting a little "hairy"!

=SUMPRODUCT(SUMIF(OFFSET($B2,ROW(B2:B6)-MIN(ROW(B2:B6)),),1,INDIRECT("'"&sNames&"'!"&CHAR( COLUMNS($A:A)+64)&"1")))

That'll work up to Z1.

After that, you're on your own!

Biff

"Steve" wrote in message
ups.com...
Biff,

Disregard previous post. I got it! I have one follow up question if
I may - is it possible to make the cell being summed (in this case A1)
dynamic as well? Meaning, if I copy the formula down one row, can I
get it to sum cell B1? Thanks!



On Apr 5, 5:11 pm, "T. Valko" wrote:
If you only have a "few" sheets then I would probably use Bill's
suggestion.

If you have "a lot" of sheets then this will work:

Give your list of sheet names a defined name. Something like sNames.

Then:

=SUMPRODUCT(SUMIF(OFFSET(B2,ROW(B2:B6)-MIN(ROW(B2:B6)),),1,INDIRECT("'"&sNa*mes&"'!A1")))

Biff

"Steve" wrote in message

oups.com...



Hello. I have 5 sheets (named Sheet1 though Sheet5). On an input
sheet, I wrote sheet1 though sheet5 in cells A2:A6, with a 1 or 0 in
column B. Is there a way sum cell A1 in each of the sheets that have
a 1 next to it in column B?- Hide quoted text -


- Show quoted text -




  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,886
Default Dynamic Sum

Hi Biff

Maybe the following would allow you to go past Z1

=SUMPRODUCT(SUMIF(OFFSET($B2,ROW(B2:B6)-
MIN(ROW(B2:B6)),),1,
INDIRECT("'"&sNames&"'!"&ADDRESS(1,COLUMN(A1),4))) )

--
Regards

Roger Govier


"T. Valko" wrote in message
...
if I copy the formula down one row, can I
get it to sum cell B1?


Do you mean if you copy it *across* a row?

Ok, now you're getting a little "hairy"!

=SUMPRODUCT(SUMIF(OFFSET($B2,ROW(B2:B6)-MIN(ROW(B2:B6)),),1,INDIRECT("'"&sNames&"'!"&CHAR( COLUMNS($A:A)+64)&"1")))

That'll work up to Z1.

After that, you're on your own!

Biff

"Steve" wrote in message
ups.com...
Biff,

Disregard previous post. I got it! I have one follow up question if
I may - is it possible to make the cell being summed (in this case A1)
dynamic as well? Meaning, if I copy the formula down one row, can I
get it to sum cell B1? Thanks!



On Apr 5, 5:11 pm, "T. Valko" wrote:
If you only have a "few" sheets then I would probably use Bill's
suggestion.

If you have "a lot" of sheets then this will work:

Give your list of sheet names a defined name. Something like sNames.

Then:

=SUMPRODUCT(SUMIF(OFFSET(B2,ROW(B2:B6)-MIN(ROW(B2:B6)),),1,INDIRECT("'"&sNa*mes&"'!A1")))

Biff

"Steve" wrote in message

oups.com...



Hello. I have 5 sheets (named Sheet1 though Sheet5). On an input
sheet, I wrote sheet1 though sheet5 in cells A2:A6, with a 1 or 0
in
column B. Is there a way sum cell A1 in each of the sheets that
have
a 1 next to it in column B?- Hide quoted text -


- Show quoted text -






  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Dynamic Sum

Yeah, that'll work. In fact, that is less confusing than:

CHAR(COLUMNS($A:A)+64)&"1"

Biff

"Roger Govier" wrote in message
...
Hi Biff

Maybe the following would allow you to go past Z1

=SUMPRODUCT(SUMIF(OFFSET($B2,ROW(B2:B6)-
MIN(ROW(B2:B6)),),1,
INDIRECT("'"&sNames&"'!"&ADDRESS(1,COLUMN(A1),4))) )

--
Regards

Roger Govier


"T. Valko" wrote in message
...
if I copy the formula down one row, can I
get it to sum cell B1?


Do you mean if you copy it *across* a row?

Ok, now you're getting a little "hairy"!

=SUMPRODUCT(SUMIF(OFFSET($B2,ROW(B2:B6)-MIN(ROW(B2:B6)),),1,INDIRECT("'"&sNames&"'!"&CHAR( COLUMNS($A:A)+64)&"1")))

That'll work up to Z1.

After that, you're on your own!

Biff

"Steve" wrote in message
ups.com...
Biff,

Disregard previous post. I got it! I have one follow up question if
I may - is it possible to make the cell being summed (in this case A1)
dynamic as well? Meaning, if I copy the formula down one row, can I
get it to sum cell B1? Thanks!



On Apr 5, 5:11 pm, "T. Valko" wrote:
If you only have a "few" sheets then I would probably use Bill's
suggestion.

If you have "a lot" of sheets then this will work:

Give your list of sheet names a defined name. Something like sNames.

Then:

=SUMPRODUCT(SUMIF(OFFSET(B2,ROW(B2:B6)-MIN(ROW(B2:B6)),),1,INDIRECT("'"&sNa*mes&"'!A1")))

Biff

"Steve" wrote in message

oups.com...



Hello. I have 5 sheets (named Sheet1 though Sheet5). On an input
sheet, I wrote sheet1 though sheet5 in cells A2:A6, with a 1 or 0 in
column B. Is there a way sum cell A1 in each of the sheets that have
a 1 next to it in column B?- Hide quoted text -

- Show quoted text -








  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 184
Default Dynamic Sum

Thanks guys!! Much appreciated!

On Apr 5, 10:00 pm, "T. Valko" wrote:
Yeah, that'll work. In fact, that is less confusing than:

CHAR(COLUMNS($A:A)+64)&"1"

Biff

"Roger Govier" wrote in message

...



Hi Biff


Maybe the following would allow you to go past Z1


=SUMPRODUCT(SUMIF(OFFSET($B2,ROW(B2:B6)-
MIN(ROW(B2:B6)),),1,
INDIRECT("'"&sNames&"'!"&ADDRESS(1,COLUMN(A1),4))) )


--
Regards


Roger Govier


"T. Valko" wrote in message
...
if I copy the formula down one row, can I
get it to sum cell B1?


Do you mean if you copy it *across* a row?


Ok, now you're getting a little "hairy"!


=SUMPRODUCT(SUMIF(OFFSET($B2,ROW(B2:B6)-MIN(ROW(B2:B6)),),1,INDIRECT("'"&sN*ames&"'!"&CHAR (COLUMNS($A:A)+64)&"1")))


That'll work up to Z1.


After that, you're on your own!


Biff


"Steve" wrote in message
roups.com...
Biff,


Disregard previous post. I got it! I have one follow up question if
I may - is it possible to make the cell being summed (in this case A1)
dynamic as well? Meaning, if I copy the formula down one row, can I
get it to sum cell B1? Thanks!


On Apr 5, 5:11 pm, "T. Valko" wrote:
If you only have a "few" sheets then I would probably use Bill's
suggestion.


If you have "a lot" of sheets then this will work:


Give your list of sheet names a defined name. Something like sNames.


Then:


=SUMPRODUCT(SUMIF(OFFSET(B2,ROW(B2:B6)-MIN(ROW(B2:B6)),),1,INDIRECT("'"&sNa**mes&"'!A1")) )


Biff


"Steve" wrote in message


egroups.com...


Hello. I have 5 sheets (named Sheet1 though Sheet5). On an input
sheet, I wrote sheet1 though sheet5 in cells A2:A6, with a 1 or 0 in
column B. Is there a way sum cell A1 in each of the sheets that have
a 1 next to it in column B?- Hide quoted text -


- Show quoted text -- Hide quoted text -


- Show quoted text -





  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Dynamic Sum

You're welcome. Thanks for the feedback!

Biff

"Steve" wrote in message
ups.com...
Thanks guys!! Much appreciated!

On Apr 5, 10:00 pm, "T. Valko" wrote:
Yeah, that'll work. In fact, that is less confusing than:

CHAR(COLUMNS($A:A)+64)&"1"

Biff

"Roger Govier" wrote in message

...



Hi Biff


Maybe the following would allow you to go past Z1


=SUMPRODUCT(SUMIF(OFFSET($B2,ROW(B2:B6)-
MIN(ROW(B2:B6)),),1,
INDIRECT("'"&sNames&"'!"&ADDRESS(1,COLUMN(A1),4))) )


--
Regards


Roger Govier


"T. Valko" wrote in message
...
if I copy the formula down one row, can I
get it to sum cell B1?


Do you mean if you copy it *across* a row?


Ok, now you're getting a little "hairy"!


=SUMPRODUCT(SUMIF(OFFSET($B2,ROW(B2:B6)-MIN(ROW(B2:B6)),),1,INDIRECT("'"&sN*ames&"'!"&CHAR (COLUMNS($A:A)+64)&"1")))


That'll work up to Z1.


After that, you're on your own!


Biff


"Steve" wrote in message
roups.com...
Biff,


Disregard previous post. I got it! I have one follow up question if
I may - is it possible to make the cell being summed (in this case A1)
dynamic as well? Meaning, if I copy the formula down one row, can I
get it to sum cell B1? Thanks!


On Apr 5, 5:11 pm, "T. Valko" wrote:
If you only have a "few" sheets then I would probably use Bill's
suggestion.


If you have "a lot" of sheets then this will work:


Give your list of sheet names a defined name. Something like sNames.


Then:


=SUMPRODUCT(SUMIF(OFFSET(B2,ROW(B2:B6)-MIN(ROW(B2:B6)),),1,INDIRECT("'"&sNa**mes&"'!A1")) )


Biff


"Steve" wrote in message


egroups.com...


Hello. I have 5 sheets (named Sheet1 though Sheet5). On an input
sheet, I wrote sheet1 though sheet5 in cells A2:A6, with a 1 or 0 in
column B. Is there a way sum cell A1 in each of the sheets that
have
a 1 next to it in column B?- Hide quoted text -


- Show quoted text -- Hide quoted text -


- Show quoted text -




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
Dynamic Formula with Dynamic Address dmz_asdf Excel Worksheet Functions 7 December 15th 06 07:13 PM
Make dynamic charts more dynamic Milo Charts and Charting in Excel 1 April 12th 06 09:01 AM
Help with copying dynamic column selected based on remote cell value and dynamic formula fill ers Charts and Charting in Excel 0 March 1st 06 01:05 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
Dynamic Formulas with Dynamic Ranges Ralph Howarth Excel Worksheet Functions 5 January 21st 05 08:44 AM


All times are GMT +1. The time now is 09:16 PM.

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"