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
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
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")
 
Upvote 0
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:
Upvote 0
Catherine

how about

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

hope that works!


Ed
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,744
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top