2

Apologies for the seemingly basic Excel question - I have tried Google but can't quite find anything about this!

All I want to do is do a sum of a column based if the corresponding column before that fits into certain criteria.

For example, if I have:

    Column A   Column B
    YY            20
    ZZ            4
    TT            8
    UU            15

In a seperate cell, I want to sum up Column B where Column A is YY AND TT

How would I do this?

1 Answer 1

5
 =SUM(SUMIF(A:A,{"YY","TT"},B:B))
Sign up to request clarification or add additional context in comments.

1 Comment

Wow, I was going to do =IF(OR(A1="YY",A1="TT"),B1,0) in column C and sum the C column, but this is much nicer. +1

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.