Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 45
Default sumif with 2 criteria?

I want to add up some turnover stats in column E but sort the numbers
according to two criteria held in columns A and D

If there was only the one I would do this with a simple sumif formula but
I'm not too sure how to go about it with two separate criteria...

Any help? :-)
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,533
Default sumif with 2 criteria?

Hi

If you are using xl2007, you can use =Sumifs() function, else you have to
use a SumProduct formula.

Supply us with some more information if you need help writing the formula.

Regards,
Per

"Wombat" skrev i meddelelsen
...
I want to add up some turnover stats in column E but sort the numbers
according to two criteria held in columns A and D

If there was only the one I would do this with a simple sumif formula but
I'm not too sure how to go about it with two separate criteria...

Any help? :-)


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default sumif with 2 criteria?

Hi,

=SUMPRODUCT((A1:A10="1st Criteria")*(D1:D10="2nd Criteria")*(E1:E10))

Mike

"Wombat" wrote:

I want to add up some turnover stats in column E but sort the numbers
according to two criteria held in columns A and D

If there was only the one I would do this with a simple sumif formula but
I'm not too sure how to go about it with two separate criteria...

Any help? :-)

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 506
Default sumif with 2 criteria?


=SUMPRODUCT((A1:A100="YOUR A COLUMN CRITERIA")*(D1:D100="YOUR D COLUMN
CRITERIA")*E1:E100)

Sample:-
=SUMPRODUCT((A1:A100="A")*(D1:D100="D")*E1:E100)


Remember to Click Yes, if this post helps!

--------------------
(Ms-Exl-Learner)
--------------------


"Wombat" wrote:

I want to add up some turnover stats in column E but sort the numbers
according to two criteria held in columns A and D

If there was only the one I would do this with a simple sumif formula but
I'm not too sure how to go about it with two separate criteria...

Any help? :-)

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 45
Default sumif with 2 criteria?

Thanks for your answers. I think I get the principle of the formula but I get
a #NAME error when I try it...

=sumproduct((C18:C31=a)*(D18:D31=q)*(E18:E31))

My version of Excel (2003 in German!) seems to want semi-colons instead of *
symbols. Does this make a difference?

Advice?


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default sumif with 2 criteria?

Hi,

In you example formula if you are searching for "a" then you must put it in
quotes, if you are searching for number then you don't use quotes.

so

=sumproduct((C18:C31="a")*(D18:D31="q")*(E18:E31))


or

=sumproduct((C18:C31=99)*(D18:D31=100)*(E18:E31))


or better still use cell references for the criteria

=sumproduct((C18:C31=A1)*(D18:D31=B1)*(E18:E31))


Mike

"Wombat" wrote:

Thanks for your answers. I think I get the principle of the formula but I get
a #NAME error when I try it...


My version of Excel (2003 in German!) seems to want semi-colons instead of *
symbols. Does this make a difference?

Advice?

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 45
Default sumif with 2 criteria?


This is what my formula looks like:

=sumproduct((Tabelle3!$B:$B=Tabelle1!$C6)*(Tabelle 3!$C:$C=Tabelle1!E$5)*(Tabelle3!$D:$D))

"Tabelle1!$C6" is a 6 digit number which has been converted to a text format
"Tabelle1!E$5" is a word
"Tabelle3!$D:$D" this contains the turnover (currency)

So far, its still coming back with a number error...


"Mike H" wrote:

Hi,

In you example formula if you are searching for "a" then you must put it in
quotes, if you are searching for number then you don't use quotes.

so

=sumproduct((C18:C31="a")*(D18:D31="q")*(E18:E31))


or

=sumproduct((C18:C31=99)*(D18:D31=100)*(E18:E31))


or better still use cell references for the criteria

=sumproduct((C18:C31=A1)*(D18:D31=B1)*(E18:E31))


Mike

"Wombat" wrote:

Thanks for your answers. I think I get the principle of the formula but I get
a #NAME error when I try it...


My version of Excel (2003 in German!) seems to want semi-colons instead of *
symbols. Does this make a difference?

Advice?

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default sumif with 2 criteria?

Hi,

You can't use full columns unless you are using Excel 2007 so shorten the
ranges

=SUMPRODUCT((Tabelle3!B1:B20=Tabelle1!$C6)*(Tabell e3!C1:C20=Tabelle1!E$5)*(Tabelle3!D1:D20))

Mike
"Wombat" wrote:


This is what my formula looks like:


"Tabelle1!$C6" is a 6 digit number which has been converted to a text format
"Tabelle1!E$5" is a word
"Tabelle3!$D:$D" this contains the turnover (currency)

So far, its still coming back with a number error...


"Mike H" wrote:

Hi,

In you example formula if you are searching for "a" then you must put it in
quotes, if you are searching for number then you don't use quotes.

so

=sumproduct((C18:C31="a")*(D18:D31="q")*(E18:E31))


or

=sumproduct((C18:C31=99)*(D18:D31=100)*(E18:E31))


or better still use cell references for the criteria

=sumproduct((C18:C31=A1)*(D18:D31=B1)*(E18:E31))


Mike

"Wombat" wrote:

Thanks for your answers. I think I get the principle of the formula but I get
a #NAME error when I try it...


My version of Excel (2003 in German!) seems to want semi-colons instead of *
symbols. Does this make a difference?

Advice?

  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default sumif with 2 criteria?

In Excel 2003 you can't use a full column reference.
Change $B:$B to $B2:$B100 or an appropriate range.
--
David Biddulph

"Wombat" wrote in message
...

This is what my formula looks like:

=sumproduct((Tabelle3!$B:$B=Tabelle1!$C6)*(Tabelle 3!$C:$C=Tabelle1!E$5)*(Tabelle3!$D:$D))

"Tabelle1!$C6" is a 6 digit number which has been converted to a text
format
"Tabelle1!E$5" is a word
"Tabelle3!$D:$D" this contains the turnover (currency)

So far, its still coming back with a number error...


"Mike H" wrote:

Hi,

In you example formula if you are searching for "a" then you must put it
in
quotes, if you are searching for number then you don't use quotes.

so

=sumproduct((C18:C31="a")*(D18:D31="q")*(E18:E31))


or

=sumproduct((C18:C31=99)*(D18:D31=100)*(E18:E31))


or better still use cell references for the criteria

=sumproduct((C18:C31=A1)*(D18:D31=B1)*(E18:E31))


Mike

"Wombat" wrote:

Thanks for your answers. I think I get the principle of the formula but
I get
a #NAME error when I try it...


My version of Excel (2003 in German!) seems to want semi-colons instead
of *
symbols. Does this make a difference?

Advice?



  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,533
Default sumif with 2 criteria?

Hi

You can not use the entire column as reference before xl2007, so change your
formula like this:

=SUMPRODUCT(--(Tabelle3!$B1:$B1000=Tabelle1!$C6);--(Tabelle3!$C1:$C1000=Tabelle1!E$5);--(Tabelle3!$D1:$D1000))

Just remeber that all ranges has to have same size.

Regards,
Per

"Wombat" skrev i meddelelsen
...

This is what my formula looks like:

=sumproduct((Tabelle3!$B:$B=Tabelle1!$C6)*(Tabelle 3!$C:$C=Tabelle1!E$5)*(Tabelle3!$D:$D))

"Tabelle1!$C6" is a 6 digit number which has been converted to a text
format
"Tabelle1!E$5" is a word
"Tabelle3!$D:$D" this contains the turnover (currency)

So far, its still coming back with a number error...


"Mike H" wrote:

Hi,

In you example formula if you are searching for "a" then you must put it
in
quotes, if you are searching for number then you don't use quotes.

so

=sumproduct((C18:C31="a")*(D18:D31="q")*(E18:E31))


or

=sumproduct((C18:C31=99)*(D18:D31=100)*(E18:E31))


or better still use cell references for the criteria

=sumproduct((C18:C31=A1)*(D18:D31=B1)*(E18:E31))


Mike

"Wombat" wrote:

Thanks for your answers. I think I get the principle of the formula but
I get
a #NAME error when I try it...


My version of Excel (2003 in German!) seems to want semi-colons instead
of *
symbols. Does this make a difference?

Advice?




  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 45
Default sumif with 2 criteria?

It works!!

I just had a little victory dance to celebrate and scared a colleague!

Thanks a lot



"Wombat" wrote:

I want to add up some turnover stats in column E but sort the numbers
according to two criteria held in columns A and D

If there was only the one I would do this with a simple sumif formula but
I'm not too sure how to go about it with two separate criteria...

Any help? :-)

  #12   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default sumif with 2 criteria?

Great. Just for your information; in XL2003 you can refer as below incase
your data can run down to any number of cells. 65535 is just one row less
than the max number of rows; but keep in mind that SUMPRODUCT() formula is
going to be slower with the increase in range..

=SUMPRODUCT((Tabelle3!$B1:$B65535=Tabelle1!$C6)*
(Tabelle3!$C1:$C65535=Tabelle1!E$5)*(Tabelle3!$D1: $D65535))

--
Jacob


"Wombat" wrote:

It works!!

I just had a little victory dance to celebrate and scared a colleague!

Thanks a lot



"Wombat" wrote:

I want to add up some turnover stats in column E but sort the numbers
according to two criteria held in columns A and D

If there was only the one I would do this with a simple sumif formula but
I'm not too sure how to go about it with two separate criteria...

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 with criteria jj Excel Worksheet Functions 2 May 16th 08 03:16 AM
How do I use Sumif and have the criteria be 10 AND <26? Jose Excel Discussion (Misc queries) 2 October 25th 07 08:21 PM
Sumif with criteria help Shannan Excel Worksheet Functions 3 May 30th 07 08:01 PM
SUMIF with two criteria?? Potatosalad2 Excel Discussion (Misc queries) 3 October 25th 05 09:59 PM
nested sumif or sumif with two criteria dshigley Excel Worksheet Functions 5 April 5th 05 03:34 AM


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