SUMIFS OR question

Options

I have this formula that works with the "CONTAINS" function, but I now want it to equal that number instead of contains (as the contains doesn't work if it equals oddly enough).

=SUMIFS({TOTAL COST - Costing Sheet}, {CODE - Costing Sheet}, OR(CONTAINS("300", @cell), CONTAINS("301", @cell), CONTAINS("302", @cell), CONTAINS("802", @cell), CONTAINS("855", @cell), CONTAINS("303", @cell)), {WALL ID - Costing Sheet}, [Wall ID]@row)


I tried having @cell=the number, but that doesn't work. (*I removed a bunch of the numbers until I can get the formula to work!)

=SUMIFS({TOTAL COST - Costing Sheet}, {CODE - Costing Sheet}, OR(@cell = "300", @cell = "301"), {WALL ID - Costing Sheet}, [Wall ID]@row)


Any thoughts other than adding all my sumifs together?


Thanks!

Best Answer

  • AmandaMerrigan
    Answer ✓
    Options

    Disregard - after more searching I found that substituting HAS for CONTAINS in my first formula works for exact values. (I still don't understand why the second one doesn't work as I found that as a solution for other posts, so if you come across this post and know the reason please feel free to comment!)

Answers

  • AmandaMerrigan
    Answer ✓
    Options

    Disregard - after more searching I found that substituting HAS for CONTAINS in my first formula works for exact values. (I still don't understand why the second one doesn't work as I found that as a solution for other posts, so if you come across this post and know the reason please feel free to comment!)

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!