#1   Report Post  
Posted to microsoft.public.excel.programming
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.programming
external usenet poster
 
Posts: 2,718
Default Dynamic Sum

Multiply each of the A1's times its corresponding cell in column B.

--
Jim
"Steve" wrote in message
ups.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.programming
external usenet poster
 
Posts: 184
Default Dynamic Sum

On Apr 5, 4:41 pm, "Jim Rech" wrote:
Multiply each of the A1's times its corresponding cell in column B.

--
Jim"Steve" wrote in message

ups.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?
|


Thanks Jim. But I oversimplified the question dramatically. Its more
like I need to sum cells A1:AC457 based on whether or not the sheet in
the Input section has a 1 or zero next to it. Also, there are MANY
more than 5 sheets. Is there something that can be done with named
ranges?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Dynamic Sum

Maybe my brain isn't firing on all cyclinders today but I cannot envision a
practical way to do what you want via formulas or named ranges.

The only thing that does come to mind requires a macro to make it practical
and even then it's a little kludgey.

Presumably you have summing formulas like this: =SUM(Sheet1:Sheet10!A1).
This sums the values in cell A1 for all the sheets that fall between Sheet1
and Sheet10 inclusive. If you didn't want, say, Sheet9 to be included, you
could move to after Sheet10.

Since you'd probably want to be able in exclude Sheet1 and Sheet10 you would
need to have two dummy sheets that came before the first and after the last:
=SUM(BeforeFirstSheet:AfterLastSheet!A1).

A macro could go through all your 0's and 1's and move the sheets as needed.

Like I said, a little kludgey.<g
--
Jim
"Steve" wrote in message
ups.com...
On Apr 5, 4:41 pm, "Jim Rech" wrote:
Multiply each of the A1's times its corresponding cell in column B.

--
Jim"Steve" wrote in message

ups.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?
|


Thanks Jim. But I oversimplified the question dramatically. Its more
like I need to sum cells A1:AC457 based on whether or not the sheet in
the Input section has a 1 or zero next to it. Also, there are MANY
more than 5 sheets. Is there something that can be done with named
ranges?


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 pivot table linked to dynamic excel spreadsheets FErd Excel Worksheet Functions 0 April 29th 10 10:44 PM
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
Help with copying dynamic column selected based on remote cell value and dynamic formula fill ers Excel Programming 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
select dynamic range with dynamic start point Juli Excel Programming 1 August 31st 05 12:05 AM


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