Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 52
Default sum/group by 2 conditions

A twist on sumif?
I'm trying to sum column B by 2 conditions (columns A and C) and display the
summation and the 2 conditions that match. The example below is very short,
but there are approx. 100 conditions for column A and C that form many
comibinations. I need to display the conditions (that both need to be met)
with the summation.

For example (the data is much larger than this):
A B C
13-0506 Striping Contract 10.00 610
13-0506 Striping Contract 5.00 480
13-0506 Striping Contract 4.00 480
13-0501 Maint Job Inspection 2.00 610
13-0506 Striping Contract 2.00 610

Desired result:

A B C
13-0506 Striping Contract 12.00 610
13-0506 Striping Contract 9.00 480
13-0501 Maint Job Inspection 2.00 610


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,047
Default sum/group by 2 conditions

Hi

try to use Sumproduct

=sumproduct(--($a$2:$a$1000=a1010)*($C$2:$c$1000=c1010);(b2:b100 0))

assuming that your data is on a2:c1000 and you will start the summary on
a1010.

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"novice" escreveu:

A twist on sumif?
I'm trying to sum column B by 2 conditions (columns A and C) and display the
summation and the 2 conditions that match. The example below is very short,
but there are approx. 100 conditions for column A and C that form many
comibinations. I need to display the conditions (that both need to be met)
with the summation.

For example (the data is much larger than this):
A B C
13-0506 Striping Contract 10.00 610
13-0506 Striping Contract 5.00 480
13-0506 Striping Contract 4.00 480
13-0501 Maint Job Inspection 2.00 610
13-0506 Striping Contract 2.00 610

Desired result:

A B C
13-0506 Striping Contract 12.00 610
13-0506 Striping Contract 9.00 480
13-0501 Maint Job Inspection 2.00 610


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 52
Default sum/group by 2 conditions

Sorry big guy that didn't work. Maybe I wasn't clear enough in what I want to
be displayed/summed from the data. I want column b summed for those rows for
the same text in column a and column c. If that makes it clear as mud.

"Marcelo" wrote:

Hi

try to use Sumproduct

=sumproduct(--($a$2:$a$1000=a1010)*($C$2:$c$1000=c1010);(b2:b100 0))

assuming that your data is on a2:c1000 and you will start the summary on
a1010.

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"novice" escreveu:

A twist on sumif?
I'm trying to sum column B by 2 conditions (columns A and C) and display the
summation and the 2 conditions that match. The example below is very short,
but there are approx. 100 conditions for column A and C that form many
comibinations. I need to display the conditions (that both need to be met)
with the summation.

For example (the data is much larger than this):
A B C
13-0506 Striping Contract 10.00 610
13-0506 Striping Contract 5.00 480
13-0506 Striping Contract 4.00 480
13-0501 Maint Job Inspection 2.00 610
13-0506 Striping Contract 2.00 610

Desired result:

A B C
13-0506 Striping Contract 12.00 610
13-0506 Striping Contract 9.00 480
13-0501 Maint Job Inspection 2.00 610


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 30
Default sum/group by 2 conditions

On Dec 13, 1:55 am, novice wrote:
Sorry big guy that didn't work. Maybe I wasn't clear enough in what I want to
be displayed/summed from the data. I want column b summed for those rows for
the same text in column a and column c. If that makes it clear as mud.

"Marcelo" wrote:
Hi


try to use Sumproduct


=sumproduct(--($a$2:$a$1000=a1010)*($C$2:$c$1000=c1010);(b2:b100 0))


assuming that your data is on a2:c1000 and you will start the summary on
a1010.


hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo


"novice" escreveu:


A twist on sumif?
I'm trying to sum column B by 2 conditions (columns A and C) and display the
summation and the 2 conditions that match. The example below is very short,
but there are approx. 100 conditions for column A and C that form many
comibinations. I need to display the conditions (that both need to be met)
with the summation.


For example (the data is much larger than this):
A B C
13-0506 Striping Contract 10.00 610
13-0506 Striping Contract 5.00 480
13-0506 Striping Contract 4.00 480
13-0501 Maint Job Inspection 2.00 610
13-0506 Striping Contract 2.00 610


Desired result:


A B C
13-0506 Striping Contract 12.00 610
13-0506 Striping Contract 9.00 480
13-0501 Maint Job Inspection 2.00 610


put this formula in col D

=SUMPRODUCT(($A$2:$A$6=A2)*($C$2:$C$6=C2)*($B$2:$B $6))
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 52
Default sum/group by 2 conditions

That is a great help, shaqil, but can the function be changed to only display
one time if both conditions are met, and also display in the same row the
conditions that are being met. Will functions handle animals like this or do
I need to write a macro?

thanks for any help.

"shaqil" wrote:

On Dec 13, 1:55 am, novice wrote:
Sorry big guy that didn't work. Maybe I wasn't clear enough in what I want to
be displayed/summed from the data. I want column b summed for those rows for
the same text in column a and column c. If that makes it clear as mud.

"Marcelo" wrote:
Hi


try to use Sumproduct


=sumproduct(--($a$2:$a$1000=a1010)*($C$2:$c$1000=c1010);(b2:b100 0))


assuming that your data is on a2:c1000 and you will start the summary on
a1010.


hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo


"novice" escreveu:


A twist on sumif?
I'm trying to sum column B by 2 conditions (columns A and C) and display the
summation and the 2 conditions that match. The example below is very short,
but there are approx. 100 conditions for column A and C that form many
comibinations. I need to display the conditions (that both need to be met)
with the summation.


For example (the data is much larger than this):
A B C
13-0506 Striping Contract 10.00 610
13-0506 Striping Contract 5.00 480
13-0506 Striping Contract 4.00 480
13-0501 Maint Job Inspection 2.00 610
13-0506 Striping Contract 2.00 610


Desired result:


A B C
13-0506 Striping Contract 12.00 610
13-0506 Striping Contract 9.00 480
13-0501 Maint Job Inspection 2.00 610


put this formula in col D

=SUMPRODUCT(($A$2:$A$6=A2)*($C$2:$C$6=C2)*($B$2:$B $6))

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
Copy Data from One Group of Cells to Another Group Alan Auerbach Charts and Charting in Excel 2 May 27th 07 04:12 PM
shade cells based on conditions - i have more than 3 conditions Mo2 Excel Worksheet Functions 3 March 30th 07 07:19 AM
How can I convert a group of numbers to a group of letters? CarlG Excel Worksheet Functions 9 August 18th 06 03:31 PM
Taking age group Ie ages 20-29 and picking out net sales for group viabello Excel Worksheet Functions 1 April 25th 06 04:19 AM
How do I group worksheets (Lotus 123 function is "Sheet>Group Shee jaking Excel Worksheet Functions 2 August 30th 05 02:09 PM


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