Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
gerryboy458
 
Posts: n/a
Default Sum a range based on a criterion


How do I sum the following data

ITEM JAN FEB MAR
A 1,000.00 2,000.00 3,000.00
B 2,000.00 3,000.00 3,000.00
C 5,000.00 8,000.00 5,000.00
E 8,000.00 8,000.00 8,000.00
A 10,000.00 10,000.00 10,000.00
C 12,000.00 12,000.00 12,000.00
D 14,000.00 14,000.00 14,000.00
E 16,000.00 16,000.00 16,000.00


I would like to create a summary for each item for the quarter in a
table as follows:

ITEM TOTAL FOR THE QUARTER
A
B
C
D
E

I have tried all kinds of arrays and SUMIFs without much success. The
best solution so far is something like
SUMIF($C$9:$C$18,F32,$G$9:$G$18)+SUMIF($C$9:$C$18, F32,$H$9:$H$18)+SUMIF($C$9:$C$18,F32,$I$9:$I$18)
but this is far too long and complicated especially as the real data has
56 items over 12 months!

Please help!


--
gerryboy458
------------------------------------------------------------------------
gerryboy458's Profile: http://www.excelforum.com/member.php...o&userid=30684
View this thread: http://www.excelforum.com/showthread...hreadid=503476

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Duke Carey
 
Posts: n/a
Default Sum a range based on a criterion

This worked in a simple test - using your sample data and putting the value
A
into cell A14

=SUMPRODUCT(--($A$2:$A$9=A14),($B$2:$B$9+$C$2:$C$9+$D$2:$D$9))

"gerryboy458" wrote:


How do I sum the following data

ITEM JAN FEB MAR
A 1,000.00 2,000.00 3,000.00
B 2,000.00 3,000.00 3,000.00
C 5,000.00 8,000.00 5,000.00
E 8,000.00 8,000.00 8,000.00
A 10,000.00 10,000.00 10,000.00
C 12,000.00 12,000.00 12,000.00
D 14,000.00 14,000.00 14,000.00
E 16,000.00 16,000.00 16,000.00


I would like to create a summary for each item for the quarter in a
table as follows:

ITEM TOTAL FOR THE QUARTER
A
B
C
D
E

I have tried all kinds of arrays and SUMIFs without much success. The
best solution so far is something like
SUMIF($C$9:$C$18,F32,$G$9:$G$18)+SUMIF($C$9:$C$18, F32,$H$9:$H$18)+SUMIF($C$9:$C$18,F32,$I$9:$I$18)
but this is far too long and complicated especially as the real data has
56 items over 12 months!

Please help!


--
gerryboy458
------------------------------------------------------------------------
gerryboy458's Profile: http://www.excelforum.com/member.php...o&userid=30684
View this thread: http://www.excelforum.com/showthread...hreadid=503476


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Duke Carey
 
Posts: n/a
Default Sum a range based on a criterion

Forgot to mention that

=SUMPRODUCT(--($A$2:$A$9=A14),($B$2:$B$9+$C$2:$C$9+$D$2:$D$9))

is an array formula - commit it by pressing Shift-Ctrl-Enter



"gerryboy458" wrote:


How do I sum the following data

ITEM JAN FEB MAR
A 1,000.00 2,000.00 3,000.00
B 2,000.00 3,000.00 3,000.00
C 5,000.00 8,000.00 5,000.00
E 8,000.00 8,000.00 8,000.00
A 10,000.00 10,000.00 10,000.00
C 12,000.00 12,000.00 12,000.00
D 14,000.00 14,000.00 14,000.00
E 16,000.00 16,000.00 16,000.00


I would like to create a summary for each item for the quarter in a
table as follows:

ITEM TOTAL FOR THE QUARTER
A
B
C
D
E

I have tried all kinds of arrays and SUMIFs without much success. The
best solution so far is something like
SUMIF($C$9:$C$18,F32,$G$9:$G$18)+SUMIF($C$9:$C$18, F32,$H$9:$H$18)+SUMIF($C$9:$C$18,F32,$I$9:$I$18)
but this is far too long and complicated especially as the real data has
56 items over 12 months!

Please help!


--
gerryboy458
------------------------------------------------------------------------
gerryboy458's Profile: http://www.excelforum.com/member.php...o&userid=30684
View this thread: http://www.excelforum.com/showthread...hreadid=503476


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Duke Carey
 
Posts: n/a
Default Sum a range based on a criterion

Well. Surprise, surprise. You don't have to enter it as an array formula.
It seems to work just fine entered normally


"gerryboy458" wrote:


How do I sum the following data

ITEM JAN FEB MAR
A 1,000.00 2,000.00 3,000.00
B 2,000.00 3,000.00 3,000.00
C 5,000.00 8,000.00 5,000.00
E 8,000.00 8,000.00 8,000.00
A 10,000.00 10,000.00 10,000.00
C 12,000.00 12,000.00 12,000.00
D 14,000.00 14,000.00 14,000.00
E 16,000.00 16,000.00 16,000.00


I would like to create a summary for each item for the quarter in a
table as follows:

ITEM TOTAL FOR THE QUARTER
A
B
C
D
E

I have tried all kinds of arrays and SUMIFs without much success. The
best solution so far is something like
SUMIF($C$9:$C$18,F32,$G$9:$G$18)+SUMIF($C$9:$C$18, F32,$H$9:$H$18)+SUMIF($C$9:$C$18,F32,$I$9:$I$18)
but this is far too long and complicated especially as the real data has
56 items over 12 months!

Please help!


--
gerryboy458
------------------------------------------------------------------------
gerryboy458's Profile: http://www.excelforum.com/member.php...o&userid=30684
View this thread: http://www.excelforum.com/showthread...hreadid=503476


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
how to compute a range of cells based on another range of cells? HAROLD Excel Worksheet Functions 2 December 30th 05 07:55 PM
Match function...random search? Les Excel Worksheet Functions 10 July 28th 05 11:54 AM
Count cells in one range based on parameters in another range dave roth Excel Worksheet Functions 2 March 29th 05 05:33 PM
Adding colour to a range of cells based on one of the cells v... McKenna Excel Discussion (Misc queries) 4 March 11th 05 02:25 PM
Need to find Min value based on date range entered Chad S Excel Worksheet Functions 0 October 28th 04 08:03 PM


All times are GMT +1. The time now is 07:23 AM.

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"