Sumif Question

Hello, I'd like to sum a set of numbers if a criteria is met from two other columns. Said differently, I want to sum the contents of column A, if column B or column C contain numbers larger than zero.


Any help would be greatly appreciated

Answers

  • Genevieve P.
    Genevieve P. Employee Admin

    Hi @Steve Girodat

    Try something like this:

    =IF(OR(SUM([Column B]:[Column B]) > 0, SUM([Column C]:[Column C]) > 0), SUM([Column A]:[Column A]))

    This will SUM the entire Column A, but only if either Column B or Column C have a numerical value in them. Is that what you were looking to do?


    If you meant that the row in Column B or C contains numbers larger than 0, I would actually add in a helper column to the sheet to help filter down your criteria. For example, you could have a checkbox for the row to show if either of your criteria is met, like so:

    =IF(OR([Column B]@row > 0, [Column C]@row > 0), 1, 0)

    This would check a box if either Column B or C is greater than 0 for this specific row. Then your SUMIF would be very simple:

    =SUMIF([Helper Column]:[Helper Column], 1, [Column A]:[Column A])


    If I've misunderstood what you're looking to do, could you provide a screen capture of your sheet with an example of your desired outcome (but please block out sensitive data).

    Cheers,

    Genevieve

  • Thank you Genevieve,


    I apologize for any confusion and thank you for your response. The second option is what I ended up going with.


    Thanks again,

    Steve

  • Genevieve P.
    Genevieve P. Employee Admin

    No problem at all! I'm glad one of these options worked for you 🙂

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!