#1   Report Post  
Posted to microsoft.public.excel.misc
Daniell
 
Posts: n/a
Default Multiple Worksheets

I have 13 worksheets, one for every month plus a total worksheet. I am
looking for a simple way to sum different cells depending on the result in
another cell. For example on the 12 monthly worksheets they all have the
same columns. Number of sales, cost of sales, budget and so on. What I
want to do is look at each worksheet and check the Number of sales and only
accumulate the amounts in the budget cell only if Number of sales is greater
than zero and place that number in a cell on the total worksheet. I
appreciate any help.
  #2   Report Post  
Posted to microsoft.public.excel.misc
Peo Sjoblom
 
Posts: n/a
Default Multiple Worksheets

One way

=SUMPRODUCT(SUMIF(INDIRECT("'"&G1:G11&"'!A2"),"0" ,INDIRECT("'"&G1:G11&"'!B2")))

where G1:G11 holds each name of the sheets, or hard coded maybe

=SUMPRODUCT(SUMIF(INDIRECT("'"&{"Jan";"Feb";"Mar"; "Apr";"May";"Jun";"Jul";"Aug";"Sep";"Oct";"Nov"}&" '!A2"),"0",INDIRECT("'"&{"Jan";"Feb";"Mar";"Apr"; "May";"Jun";"Jul";"Aug";"Sep";"Oct";"Nov"}&"'!B2") ))


A2 is the cell you want to check and B2 the one you want to sum, both can be
changed into ranges

--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com


"Daniell" wrote in message
...
I have 13 worksheets, one for every month plus a total worksheet. I am
looking for a simple way to sum different cells depending on the result in
another cell. For example on the 12 monthly worksheets they all have the
same columns. Number of sales, cost of sales, budget and so on. What I
want to do is look at each worksheet and check the Number of sales and
only
accumulate the amounts in the budget cell only if Number of sales is
greater
than zero and place that number in a cell on the total worksheet. I
appreciate any help.



  #3   Report Post  
Posted to microsoft.public.excel.misc
Daniell
 
Posts: n/a
Default Multiple Worksheets

Thanks, I will give that a try.

"Peo Sjoblom" wrote:

One way

=SUMPRODUCT(SUMIF(INDIRECT("'"&G1:G11&"'!A2"),"0" ,INDIRECT("'"&G1:G11&"'!B2")))

where G1:G11 holds each name of the sheets, or hard coded maybe

=SUMPRODUCT(SUMIF(INDIRECT("'"&{"Jan";"Feb";"Mar"; "Apr";"May";"Jun";"Jul";"Aug";"Sep";"Oct";"Nov"}&" '!A2"),"0",INDIRECT("'"&{"Jan";"Feb";"Mar";"Apr"; "May";"Jun";"Jul";"Aug";"Sep";"Oct";"Nov"}&"'!B2") ))


A2 is the cell you want to check and B2 the one you want to sum, both can be
changed into ranges

--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com


"Daniell" wrote in message
...
I have 13 worksheets, one for every month plus a total worksheet. I am
looking for a simple way to sum different cells depending on the result in
another cell. For example on the 12 monthly worksheets they all have the
same columns. Number of sales, cost of sales, budget and so on. What I
want to do is look at each worksheet and check the Number of sales and
only
accumulate the amounts in the budget cell only if Number of sales is
greater
than zero and place that number in a cell on the total worksheet. I
appreciate any help.




  #4   Report Post  
Posted to microsoft.public.excel.misc
Daniell
 
Posts: n/a
Default Multiple Worksheets

I am having a little trouble getting this to work. I created each worksheet
and placed the formula in the cell and it gives me a #REF error. I hard
coded the worksheets into the formula with the same results

"Daniell" wrote:

Thanks, I will give that a try.

"Peo Sjoblom" wrote:

One way

=SUMPRODUCT(SUMIF(INDIRECT("'"&G1:G11&"'!A2"),"0" ,INDIRECT("'"&G1:G11&"'!B2")))

where G1:G11 holds each name of the sheets, or hard coded maybe

=SUMPRODUCT(SUMIF(INDIRECT("'"&{"Jan";"Feb";"Mar"; "Apr";"May";"Jun";"Jul";"Aug";"Sep";"Oct";"Nov"}&" '!A2"),"0",INDIRECT("'"&{"Jan";"Feb";"Mar";"Apr"; "May";"Jun";"Jul";"Aug";"Sep";"Oct";"Nov"}&"'!B2") ))


A2 is the cell you want to check and B2 the one you want to sum, both can be
changed into ranges

--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com


"Daniell" wrote in message
...
I have 13 worksheets, one for every month plus a total worksheet. I am
looking for a simple way to sum different cells depending on the result in
another cell. For example on the 12 monthly worksheets they all have the
same columns. Number of sales, cost of sales, budget and so on. What I
want to do is look at each worksheet and check the Number of sales and
only
accumulate the amounts in the budget cell only if Number of sales is
greater
than zero and place that number in a cell on the total worksheet. I
appreciate any help.




  #5   Report Post  
Posted to microsoft.public.excel.misc
Peo Sjoblom
 
Posts: n/a
Default Multiple Worksheets

You can download a working example here

http://nwexcelsolutions.com/Download...e%20sheets.xls




--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com



"Daniell" wrote in message
...
I am having a little trouble getting this to work. I created each
worksheet
and placed the formula in the cell and it gives me a #REF error. I hard
coded the worksheets into the formula with the same results

"Daniell" wrote:

Thanks, I will give that a try.

"Peo Sjoblom" wrote:

One way

=SUMPRODUCT(SUMIF(INDIRECT("'"&G1:G11&"'!A2"),"0" ,INDIRECT("'"&G1:G11&"'!B2")))

where G1:G11 holds each name of the sheets, or hard coded maybe

=SUMPRODUCT(SUMIF(INDIRECT("'"&{"Jan";"Feb";"Mar"; "Apr";"May";"Jun";"Jul";"Aug";"Sep";"Oct";"Nov"}&" '!A2"),"0",INDIRECT("'"&{"Jan";"Feb";"Mar";"Apr"; "May";"Jun";"Jul";"Aug";"Sep";"Oct";"Nov"}&"'!B2") ))


A2 is the cell you want to check and B2 the one you want to sum, both
can be
changed into ranges

--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com


"Daniell" wrote in message
...
I have 13 worksheets, one for every month plus a total worksheet. I
am
looking for a simple way to sum different cells depending on the
result in
another cell. For example on the 12 monthly worksheets they all have
the
same columns. Number of sales, cost of sales, budget and so on.
What I
want to do is look at each worksheet and check the Number of sales
and
only
accumulate the amounts in the budget cell only if Number of sales is
greater
than zero and place that number in a cell on the total worksheet. I
appreciate any help.







  #6   Report Post  
Posted to microsoft.public.excel.misc
Daniell
 
Posts: n/a
Default Multiple Worksheets

Thanks Peo It is amazing when you forget a ; Thanks

"Peo Sjoblom" wrote:

You can download a working example here

http://nwexcelsolutions.com/Download...e%20sheets.xls




--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com



"Daniell" wrote in message
...
I am having a little trouble getting this to work. I created each
worksheet
and placed the formula in the cell and it gives me a #REF error. I hard
coded the worksheets into the formula with the same results

"Daniell" wrote:

Thanks, I will give that a try.

"Peo Sjoblom" wrote:

One way

=SUMPRODUCT(SUMIF(INDIRECT("'"&G1:G11&"'!A2"),"0" ,INDIRECT("'"&G1:G11&"'!B2")))

where G1:G11 holds each name of the sheets, or hard coded maybe

=SUMPRODUCT(SUMIF(INDIRECT("'"&{"Jan";"Feb";"Mar"; "Apr";"May";"Jun";"Jul";"Aug";"Sep";"Oct";"Nov"}&" '!A2"),"0",INDIRECT("'"&{"Jan";"Feb";"Mar";"Apr"; "May";"Jun";"Jul";"Aug";"Sep";"Oct";"Nov"}&"'!B2") ))


A2 is the cell you want to check and B2 the one you want to sum, both
can be
changed into ranges

--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com


"Daniell" wrote in message
...
I have 13 worksheets, one for every month plus a total worksheet. I
am
looking for a simple way to sum different cells depending on the
result in
another cell. For example on the 12 monthly worksheets they all have
the
same columns. Number of sales, cost of sales, budget and so on.
What I
want to do is look at each worksheet and check the Number of sales
and
only
accumulate the amounts in the budget cell only if Number of sales is
greater
than zero and place that number in a cell on the total worksheet. I
appreciate any help.






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
SUMif or SUMproduct across multiple worksheets? Eric Shamlin Excel Worksheet Functions 1 September 29th 05 09:55 AM
Line chart from multiple worksheets Paul B. Charts and Charting in Excel 2 September 21st 05 11:46 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 07:48 PM
Update multiple worksheets Lizz45ie Excel Discussion (Misc queries) 0 May 31st 05 09:21 PM
Countif with multiple criteria and multiple worksheets JJ Excel Worksheet Functions 1 December 28th 04 06:37 PM


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