Formulas and Functions

Formulas and Functions

Ask for help with your formula and find examples of how others use formulas and functions to solve a similar problem.

Trying to get a formula to analyze 5 columns and update a 6th column based on the results of the 5

Best Answer

  • ✭✭✭✭✭
    Answer ✓

    Its just a big nestled if statement. i.e.


    =IF(OR(col1@row="Red",col2@row="Red".......),"Red",IF(OR(countif(col1:col5@row,"Yellow')=1,countif(col1:col5@row,"Yellow')=2),"Yellow",IF(countif(col1:col5@row,"Yellow')>2,"Red",IF(OR(col1@row="",col2@row="".......),"Blue","Green"))))

    Something like that. you can sort out the details.


    I think there is a problem with your logic though as blue and other catregories are not mutually exclusive. So, when something qualifies as both blue and yellow or red, what colour do you want it to show? If you want it to be blue, you will want IF(OR(col1@row="",col2@row="".......),"Blue" at the start of the formula instead.

Answers

  • ✭✭✭✭✭
    Answer ✓

    Its just a big nestled if statement. i.e.


    =IF(OR(col1@row="Red",col2@row="Red".......),"Red",IF(OR(countif(col1:col5@row,"Yellow')=1,countif(col1:col5@row,"Yellow')=2),"Yellow",IF(countif(col1:col5@row,"Yellow')>2,"Red",IF(OR(col1@row="",col2@row="".......),"Blue","Green"))))

    Something like that. you can sort out the details.


    I think there is a problem with your logic though as blue and other catregories are not mutually exclusive. So, when something qualifies as both blue and yellow or red, what colour do you want it to show? If you want it to be blue, you will want IF(OR(col1@row="",col2@row="".......),"Blue" at the start of the formula instead.

  • Awesome! Thank you so much for your help!

  • Awesome! Thank you so much for your help!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!

Trending in Formulas and Functions

  • I'm trying to create a SUMIF formula that looks at the salesperson name in a column and adds up or totals their $ sales in another column. To ultimately show in Dashboard of Totals Sales by Salesperso…
    User: "Allan Z"
    Answered ✓
    9
    2
  • Good day Smartsheet Team, Getting an unparseable error on this formula: =IF($Name@row <> "",(SUMIFS({Expense}, {Period},1, {Type}, OR(@cell = "RES602782", @cell = "RES602497")),"") Trying to pull in a…
    User: "stratman"
    Answered ✓
    15
    2
  • I have a sheet that compiles all the responses from a form. The sheet has multiple start and end date columns, but only one start and one end date cell is NOT blank depending on the activity selected …
    User: "m_anderson"
    Answered ✓
    13
    2