Autofill if a column contains vs. if true or false

Options

trying to figure out if/how i can make a sheet auto fill a column based "if contains" not "if true"/"if false"

Ex: Door Schedule for production

Column to report on = Door Size

Reporting Column = Drop down of hinge counts

If "Door Size" contains "8-0" - Hinge Counts = 4

If "Door Size" contains "7-0" - Hinge Counts = 3


What would that Formula be?

Tags:

Answers

  • Kelly Moore
    Kelly Moore ✭✭✭✭✭✭
    Options

    Hey @zszostak

    I'm assuming only the number needs to go into the Hinge Counts column and not the number + text. The formula should reside in the Hinge Counts column.

    =IF([Door Size]@row="8-0", 4, IF([Door Size]@row="7-0", 3))

    If "8-0" is the complete textstring in your Door Size column, you do not need to use the CONTAINS function. If the "8-0" is only part of the the textstring, ex; "8-0 partnumber ABC", then yes, you could use the CONTAINS function.

    If you must use the CONTAINS function

    =IF(CONTAINS("8-0", [Door Size]@row), 4, IF(CONTAINS("7-0", [Door Size]@row),3))

    Let me know if you also need the text and I'll show you how to modify the formulas above.

    Kelly

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!