Sumif query

CVN55

New Member
Joined
Jun 14, 2017
Messages
25
Hi - what is wrong with this formula? I have used it successfully with sumproduct?
=SUMIF(H8:H106,--($B$8:$B$106="CARU")--($D$8:$D$106="Medical"))
Trying to add a column which contains the words CARU in one column and Medical in another...

Thank you,
Catherine
 

Some videos you may like

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.

Weazel

Well-known Member
Joined
Dec 24, 2011
Messages
3,155
you would need to use sumifs as you are looking for multiple conditions, as well as the syntax for sumif/sumifs is much different than sumproduct...

=SUMIFS(H8:H106,$B$8:$B$106,"CARU",$D$8:$D$106,"Medical")
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
54,463
Office Version
  1. 365
Platform
  1. Windows
Your SUMIF formula is structured completely wrong. It looks like your wrote a SUMPRODUCT formula, and just swapped out the SUMPRODUCT for SUMIF.
SUMIF also only allows one conditions. SUMIFS allows more than one.
See: https://exceljet.net/excel-functions/excel-sumifs-function

So your formula should either be:
=SUMPRODUCT(H8:H106,--($B$8:$B$106="CARU")--($D$8:$D$106="Medical"))

or
=SUMIFS(H8:H106,B8:B106,"CARU",D8:D106,"Medical")
 
Last edited:

edmitchell

New Member
Joined
Dec 18, 2017
Messages
48
Catherine

how about

=SUMIFS(H8:H106,$B$8:$B$106,"CARU",$D$8:$D$106,"Medical")

hope that works!


Ed
 

Watch MrExcel Video

Forum statistics

Threads
1,109,075
Messages
5,526,667
Members
409,714
Latest member
diamondjoechubbs

This Week's Hot Topics

Top