sumifs formula not working as expected

Mr2017

Well-known Member
Joined
Nov 28, 2016
Messages
644
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi

I've got two columns of data (A and B) and I'd like to sum the data in column B that is either "Checked" or "Partially Checked" in column A - please see the small sample below. The sum should be 40, in this case.

I've used this formula, but it's not returning the expected result. Can anyone please clarify what needs to be changed? I've done this kind of thing before, but it's been a while!

Thanks in advance.

=SUMIFS(B:B,A:A,"Checked",A:A,"Partially Checked")

Checked or Partially Checked? Total Units
Checked10
Partially Checked10
Partially Checked10
Checked10


<colgroup><col><col></colgroup><tbody>
</tbody>
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Hey,

Put it as a sum:

=SUMIFS(B:B,A:A,"Checked")+SUMIFS(B:B,A:A,"Partially Checked")

=SUMIF(A:A,"Checked",B:B)+SUMIF(A:A,"Partially Checked",B:B)

Both formulas above will work as there is only technically 1 criteria each time, so SUMIF will work as well as SUMIFS.

EDIT: The reason your formula doesn't work properly is because you are saying that column A must equal "Checked" AND "Partially Checked" - which is impossible
 
Last edited:
Upvote 0
Ok, thanks tyija1995.

I believe there's a way to do it without having to use the '+' sign to add the additional conditions.

But I'll go with your suggestion for now.

Thanks for posting it.
 
Upvote 0
Assuming that there are no other possibilities ending in "Checked" that you do NOT want to count, you could use a wildcard like this:
Code:
=SUMIF(A:A,"*Checked",B:B)

Note that the reason why your original formula did not work because when using SUMIFS, the multiple conditions are treated as AND statements, not OR statements, meaning that ALL of the conditions must be met for the item to be counted. Obviously, it is not possible for a single value to equal EXACTLY "Checked" and EXACTLY "Partially Checked" at the same time. It is either one or the other.

The formula above that I posted says to count anything ending in "Checked".
 
Upvote 0
Another alternative (normally entered; just press Enter, as usual):

=SUM(SUMIFS(B2:B1000,A2:A1000,{"Checked","Partially Checked"}))

Note the restricted ranges. In general, it is unwise to use whole-column ranges. In some cases, Excel looks at all 1+ million rows.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,605
Messages
6,120,473
Members
448,967
Latest member
visheshkotha

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