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")

[TABLE="width: 311"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD]Checked or Partially Checked? [/TD]
[TD]Total Units[/TD]
[/TR]
[TR]
[TD]Checked[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD]Partially Checked[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD]Partially Checked[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD]Checked[/TD]
[TD="align: right"]10

[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
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,223,888
Messages
6,175,219
Members
452,620
Latest member
dsubash

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