exclude a row from a sum function if value of another cell is "X"

Is it possible to exclude a row from a sum function if a column in that row has a certain value?

I'm trying to build out a cost modeling tool.. and essentially if one row has "cost incurred" vs a blank cell in that particular column, then exclude the cost from the total sum.

=IF([Cost Incurred] = "Cost Incurred", ???

Thanks!

Answers

  • Kelly Moore
    Kelly Moore ✭✭✭✭✭✭

    Hey @mtetzlaf

    You can include criteria within a SUMIFS function. It does just as it's name says SUM IF......

    The syntax is SUMIFS(range that needs to be summed, range1, criteria1, range2, criteria2)

    For example

    =SUMIFS([cost column]:[cost column], [Cost Incurred]:[Cost Incurred], <>"Cost Incurred")

    But if you are needing the IF statement that you started above

    IF([Cost Incurred]@row<>"Cost Incurred", insert your sum formula)

    Do either of these work for you?

    Kelly