# IF formula to return text response based on max value

Options
✭✭✭✭✭

I am trying to write a formula that will return "risk avoidance" if the "risk score" is the highest value of 4 values.

If Risk Score is greater than Quality, Efficiency and User Experience then return "Risk Avoidance".

If Quality score is highest then return "Quality". If Efficiency score is highest then return "Efficiencies Gained". If User Experience is highest then return "User Experience".

• ✭✭✭✭✭✭
Options

First we will need to get the highest score...

MAX([Risk Score 35%]@row:[User Experience Score 10%]@row)

Now we can use that in a nested IF to output the appropriate text value.

=IF([Risk Score 35%]@row = MAX([Risk Score 35%]@row:[User Experience Score 10%]@row), "Risk Avoidance", IF([Quality Score 20%]@row = MAX([Risk Score 35%]@row:[User Experience Score 10%]@row), "Quality", IF([Efficiency Score 35%]@row = MAX([Risk Score 35%]@row:[User Experience Score 10%]@row), "Efficiencies Gained", IF([User Experience Score 10%]@row = MAX([Risk Score 35%]@row:[User Experience Score 10%]@row), "User Experience"))))

• ✭✭✭✭✭✭
Options

First we will need to get the highest score...

MAX([Risk Score 35%]@row:[User Experience Score 10%]@row)

Now we can use that in a nested IF to output the appropriate text value.

=IF([Risk Score 35%]@row = MAX([Risk Score 35%]@row:[User Experience Score 10%]@row), "Risk Avoidance", IF([Quality Score 20%]@row = MAX([Risk Score 35%]@row:[User Experience Score 10%]@row), "Quality", IF([Efficiency Score 35%]@row = MAX([Risk Score 35%]@row:[User Experience Score 10%]@row), "Efficiencies Gained", IF([User Experience Score 10%]@row = MAX([Risk Score 35%]@row:[User Experience Score 10%]@row), "User Experience"))))

• ✭✭✭✭✭
Options

@Paul Newcome this is great, thank you! The nested formulas always get me

• ✭✭✭✭✭✭
Options

Happy to help. 👍️

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!