Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Mike
 
Posts: n/a
Default Sumif with 2 criteria

Okay, I've done my research, but I can't find the answer to this... I want to
do a sumif with two different criteria, each criteria is in a different
column (like a category, then a sub-category). I've tried the
sumproduct(--..., but I couldn't make it work.

Each number is attached to a category and sub category:

Auto Gas 130
Auto Insurance 25
Food Groceries 200
Auto Insurance 50

So, this is what i've tried: =sumif(a1:b4,and("Auto","Insurance"),c1:c4)

Please help!
  #2   Report Post  
Posted to microsoft.public.excel.misc
Loomah
 
Posts: n/a
Default Sumif with 2 criteria

Hi
Try this

=SUMPRODUCT((A3:A6="Auto")*(B3:B6="Insurance")*C3: C6)

HTH
;-)

"Mike" wrote in message
...
Okay, I've done my research, but I can't find the answer to this... I want
to
do a sumif with two different criteria, each criteria is in a different
column (like a category, then a sub-category). I've tried the
sumproduct(--..., but I couldn't make it work.

Each number is attached to a category and sub category:

Auto Gas 130
Auto Insurance 25
Food Groceries 200
Auto Insurance 50

So, this is what i've tried: =sumif(a1:b4,and("Auto","Insurance"),c1:c4)

Please help!



  #3   Report Post  
Posted to microsoft.public.excel.misc
Elkar
 
Posts: n/a
Default Sumif with 2 criteria

SUMIF can only have 1 criteria. The AND funciton won't work with it. Try
this instead:

=SUMPRODUCT(--(a1:a4="Auto"),--(b1:b4="Insurance"),--(c1:c4))

HTH,
Elkar


"Mike" wrote:

Okay, I've done my research, but I can't find the answer to this... I want to
do a sumif with two different criteria, each criteria is in a different
column (like a category, then a sub-category). I've tried the
sumproduct(--..., but I couldn't make it work.

Each number is attached to a category and sub category:

Auto Gas 130
Auto Insurance 25
Food Groceries 200
Auto Insurance 50

So, this is what i've tried: =sumif(a1:b4,and("Auto","Insurance"),c1:c4)

Please help!

  #4   Report Post  
Posted to microsoft.public.excel.misc
mrice
 
Posts: n/a
Default Sumif with 2 criteria


If you add an additional column with the formulae...

= A1 & B1 etc

You can then use SUMIF with the concatenated criteria.


--
mrice

Research Scientist with many years of spreadsheet development experience
------------------------------------------------------------------------
mrice's Profile: http://www.excelforum.com/member.php...o&userid=10931
View this thread: http://www.excelforum.com/showthread...hreadid=542659

  #5   Report Post  
Posted to microsoft.public.excel.misc
Loomah
 
Posts: n/a
Default Sumif with 2 criteria

You could also use the DSUM function if you set up your data with headings
and set up a separate table for the criteria (2 rows inc headings and as
many columns as you have criteria)

Hopefully the named ranges in this example are self explnatory

=DSUM(Tbl_With_Heads,3,Crit)

;-)

"Mike" wrote in message
...
Okay, I've done my research, but I can't find the answer to this... I want
to
do a sumif with two different criteria, each criteria is in a different
column (like a category, then a sub-category). I've tried the
sumproduct(--..., but I couldn't make it work.

Each number is attached to a category and sub category:

Auto Gas 130
Auto Insurance 25
Food Groceries 200
Auto Insurance 50

So, this is what i've tried: =sumif(a1:b4,and("Auto","Insurance"),c1:c4)

Please 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
How do I use the sumif if I have multiple criteria (i.e. greater . Kellyatisl Excel Worksheet Functions 3 June 4th 06 06:33 AM
Multiple SUMIF Criteria azazel Excel Worksheet Functions 3 November 10th 05 08:31 PM
SUMIF with Mutiple Ranges & Criteria PokerZan Excel Discussion (Misc queries) 5 August 4th 05 10:31 PM
"criteria" in a sumif refering to the value in another cell mark Excel Discussion (Misc queries) 1 January 31st 05 07:39 PM
Can I use a cell reference in the criteria for the sumif function. Number Cruncher Excel Worksheet Functions 2 November 4th 04 07:52 PM


All times are GMT +1. The time now is 02:41 PM.

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"