Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Sumif for groups and subgroups / Excel 2003

I'm trying to sum a row if it meets two different criteria. Here's an
example. Here I would try and add column C if column A was 123 and column B
was group A. Or something similar. I tried to used sumproduct (reading
other responses to similar questions) but I get #NUM! error. Any ideas?

A B C
1 123 group A 5
2 456 group D 10
3 123 group B 14
4 456 group A 7
5 123 group C 6

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Sumif for groups and subgroups / Excel 2003

Sumproduct does it for me

=SUMPRODUCT((A1:A5=123)*(B1:B5="Group A")*(C1:C5))

Mike

"mwear" wrote:

I'm trying to sum a row if it meets two different criteria. Here's an
example. Here I would try and add column C if column A was 123 and column B
was group A. Or something similar. I tried to used sumproduct (reading
other responses to similar questions) but I get #NUM! error. Any ideas?

A B C
1 123 group A 5
2 456 group D 10
3 123 group B 14
4 456 group A 7
5 123 group C 6

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Sumif for groups and subgroups / Excel 2003

It's always useful to post the formula you tried. Have a go with this
one:

=SUMPRODUCT((A1:A5=123)*(B1:B5="groupA")*(C1:C5))

If the first column contains text values rather than real numbers then
you will have to put the 123 in quotes, like this - "123"

You can't use complete columns (unless you have XL 2007).

Hope this helps.

Pete

On Jan 18, 6:54*pm, mwear wrote:
I'm trying to sum a row if it meets two different criteria. *Here's an
example. *Here I would try and add column C if column A was 123 and column B
was group A. *Or something similar. *I tried to used sumproduct (reading
other responses to similar questions) but I get #NUM! error. *Any ideas?

* * * *A * * * * * *B * * * * * *C
1 * 123 * * * group A * * * 5
2 * 456 * * * group D * * *10
3 * 123 * * * group B * * *14
4 * 456 * * * group A * * * 7
5 * 123 * * * group C * * * 6


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Sumif for groups and subgroups / Excel 2003

Can I do this across different worksheets? My column A, B, and C would be on
one worksheet and my references and answer would be another. Because, if I
copy the table and your formula it works, but when I transfer it to what I
need, it still comes up with an error.

Thanks for the quick response!!

"Mike H" wrote:

Sumproduct does it for me

=SUMPRODUCT((A1:A5=123)*(B1:B5="Group A")*(C1:C5))

Mike

"mwear" wrote:

I'm trying to sum a row if it meets two different criteria. Here's an
example. Here I would try and add column C if column A was 123 and column B
was group A. Or something similar. I tried to used sumproduct (reading
other responses to similar questions) but I get #NUM! error. Any ideas?

A B C
1 123 group A 5
2 456 group D 10
3 123 group B 14
4 456 group A 7
5 123 group C 6

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Sumif for groups and subgroups / Excel 2003

Instead of actually putting = 123, can I put in = F6 or something. Where in
F6 I would have 123? That's how I actually have it.

Here is what I actually have:
SUMPRODUCT(('[08 Profit Summary.xls]1st Purchaser'!$A$2:$A$407=B22)*('[08
Profit Summary.xls]1st Purchaser'!$C$2:$C$407=C22)*'[08 Profit
Summary.xls]1st Purchaser'!$J:$J)

Thanks for the prompt response.



"Pete_UK" wrote:

It's always useful to post the formula you tried. Have a go with this
one:

=SUMPRODUCT((A1:A5=123)*(B1:B5="groupA")*(C1:C5))

If the first column contains text values rather than real numbers then
you will have to put the 123 in quotes, like this - "123"

You can't use complete columns (unless you have XL 2007).

Hope this helps.

Pete

On Jan 18, 6:54 pm, mwear wrote:
I'm trying to sum a row if it meets two different criteria. Here's an
example. Here I would try and add column C if column A was 123 and column B
was group A. Or something similar. I tried to used sumproduct (reading
other responses to similar questions) but I get #NUM! error. Any ideas?

A B C
1 123 group A 5
2 456 group D 10
3 123 group B 14
4 456 group A 7
5 123 group C 6





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Sumif for groups and subgroups / Excel 2003

Try
=sum(if(a1:a5="123", if(b1:b5="group A", c1:c5, 0), 0)) with Ctrl+Shift+Enter

"mwear" wrote:

I'm trying to sum a row if it meets two different criteria. Here's an
example. Here I would try and add column C if column A was 123 and column B
was group A. Or something similar. I tried to used sumproduct (reading
other responses to similar questions) but I get #NUM! error. Any ideas?

A B C
1 123 group A 5
2 456 group D 10
3 123 group B 14
4 456 group A 7
5 123 group C 6

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Sumif for groups and subgroups / Excel 2003

Yes you can do that. This formula can now go anywhere in the workbook and
look at values in sheet 3

=SUMPRODUCT((Sheet3!A1:A5=123)*(Sheet3!B1:B5="Grou p A")*(Sheet3!C1:C5))

Mike

"mwear" wrote:

Can I do this across different worksheets? My column A, B, and C would be on
one worksheet and my references and answer would be another. Because, if I
copy the table and your formula it works, but when I transfer it to what I
need, it still comes up with an error.

Thanks for the quick response!!

"Mike H" wrote:

Sumproduct does it for me

=SUMPRODUCT((A1:A5=123)*(B1:B5="Group A")*(C1:C5))

Mike

"mwear" wrote:

I'm trying to sum a row if it meets two different criteria. Here's an
example. Here I would try and add column C if column A was 123 and column B
was group A. Or something similar. I tried to used sumproduct (reading
other responses to similar questions) but I get #NUM! error. Any ideas?

A B C
1 123 group A 5
2 456 group D 10
3 123 group B 14
4 456 group A 7
5 123 group C 6

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Sumif for groups and subgroups / Excel 2003

I realized what I did. I forgot to limit the J column.

Thank you so much for your help.

"Pete_UK" wrote:

It's always useful to post the formula you tried. Have a go with this
one:

=SUMPRODUCT((A1:A5=123)*(B1:B5="groupA")*(C1:C5))

If the first column contains text values rather than real numbers then
you will have to put the 123 in quotes, like this - "123"

You can't use complete columns (unless you have XL 2007).

Hope this helps.

Pete

On Jan 18, 6:54 pm, mwear wrote:
I'm trying to sum a row if it meets two different criteria. Here's an
example. Here I would try and add column C if column A was 123 and column B
was group A. Or something similar. I tried to used sumproduct (reading
other responses to similar questions) but I get #NUM! error. Any ideas?

A B C
1 123 group A 5
2 456 group D 10
3 123 group B 14
4 456 group A 7
5 123 group C 6



  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Sumif for groups and subgroups / Excel 2003

Ah, yes. I figured it out. I had forgotten to limit the sum column.

Thanks so much for your help.

"Mike H" wrote:

Sumproduct does it for me

=SUMPRODUCT((A1:A5=123)*(B1:B5="Group A")*(C1:C5))

Mike

"mwear" wrote:

I'm trying to sum a row if it meets two different criteria. Here's an
example. Here I would try and add column C if column A was 123 and column B
was group A. Or something similar. I tried to used sumproduct (reading
other responses to similar questions) but I get #NUM! error. Any ideas?

A B C
1 123 group A 5
2 456 group D 10
3 123 group B 14
4 456 group A 7
5 123 group C 6

  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Sumif for groups and subgroups / Excel 2003

You're welcome - glad you got it to work.

Pete

On Jan 18, 7:24*pm, mwear wrote:
I realized what I did. *I forgot to limit the J column.

Thank you so much for your help.



"Pete_UK" wrote:
It's always useful to post the formula you tried. Have a go with this
one:


=SUMPRODUCT((A1:A5=123)*(B1:B5="groupA")*(C1:C5))


If the first column contains text values rather than real numbers then
you will have to put the 123 in quotes, like this - "123"


You can't use complete columns (unless you have XL 2007).


Hope this helps.


Pete


On Jan 18, 6:54 pm, mwear wrote:
I'm trying to sum a row if it meets two different criteria. *Here's an
example. *Here I would try and add column C if column A was 123 and column B
was group A. *Or something similar. *I tried to used sumproduct (reading
other responses to similar questions) but I get #NUM! error. *Any ideas?


* * * *A * * * * * *B * * * * * *C
1 * 123 * * * group A * * * 5
2 * 456 * * * group D * * *10
3 * 123 * * * group B * * *14
4 * 456 * * * group A * * * 7
5 * 123 * * * group C * * * 6- 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
Calculating averages for subgroups PSmith Excel Discussion (Misc queries) 1 November 22nd 07 05:09 PM
Ranking within subgroups Stefan Excel Discussion (Misc queries) 4 June 29th 07 11:07 PM
Ranking Subgroups that are above 750 SteveC Excel Discussion (Misc queries) 1 March 8th 07 08:15 PM
Excel 2003 Much Slower When Opening Row Groups KMH Excel Discussion (Misc queries) 3 September 6th 06 05:45 PM
how do i view all groups under excel in google groups JulieD Excel Discussion (Misc queries) 2 December 16th 04 04:33 PM


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