Formula Help

Anthony DAmbrosio
Anthony DAmbrosio ✭✭✭✭
edited 06/15/22 in Formulas and Functions

Hello Smartsheet Community,

I am trying to figure out how to write a formula to highlight individual cells based on if the "Actual" number inputted into a specific cell is greater than or equal to or less than the "Target" amount. For example, if my "Target" for the month of July is to sell 500 widgets and I actually sold 300, I want the "Actual" cell to turn red. Or, If I sold 500 or more then, I want the "Actual" cell to turn green.

I tried using the conditions workflow, but I could not get it to work. I'm not sure if it's how I have the sheet formatted. Any help or suggestions would be greatly appreciated.



Best Answer

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭
    Answer ✓

    You would need a separate column to house a formula along the lines of...

    =IF(Target@row = "Actual", IF([July 2022]@row< INDEX(COLLECT([July 2022]:[July 2022], [Task Name]:[Task Name], @cell = [Task Name]@row, Target:Target, @cell = "Target"), 1), "red", "green"))


    You would then hide this column to keep the sheet looking clean and apply the conditional formatting to be based on this column and applicable only to the [July 2022] column.

    Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!

    CERTIFIED SMARTSHEET PLATINUM PARTNER

    10xViz.com

Answers

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭
    Answer ✓

    You would need a separate column to house a formula along the lines of...

    =IF(Target@row = "Actual", IF([July 2022]@row< INDEX(COLLECT([July 2022]:[July 2022], [Task Name]:[Task Name], @cell = [Task Name]@row, Target:Target, @cell = "Target"), 1), "red", "green"))


    You would then hide this column to keep the sheet looking clean and apply the conditional formatting to be based on this column and applicable only to the [July 2022] column.

    Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!

    CERTIFIED SMARTSHEET PLATINUM PARTNER

    10xViz.com

  • Thanks Paul. That formula worked great! I appreciate the help.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!