1

I have read similar questions but unfortunately didn't help me.

Here is a copy (with sensitive info redacted) of my data.
Google Sheet

In column U and V I am trying to sum columns D to O if T is "A" or "B" respectively. e.g. =sumif($T3,"A",$D3:$O3)

I have formatted all the numbers as automatic. I have formatted column T as plain text.

Only some of the formulas seem to work and I can't figure out why?

1 Answer 1

0

=IF($T3="A",SUM($D3:$O3),0) and =IF($T3="B",SUM($D3:$O3),0)

SUMIF() takes two ranges for it to work. The first range becoming the reference range for the third argument. so A1 dictates if B1 is added to the sum, A2 to B2, so and on and so forth. Currently, your SUMIF() is only able to compare the first column to the A/B preference. I think it should definitely throw an error if the first range is a different size from the second range, but that's just personal opinion.

My function simply takes an IF function and if the criterion is met, then it sums. If not, then it just displays 0.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.