IF Error needed????

Trish Dillon
Trish Dillon ✭✭✭✭✭✭
edited 12/09/19 in Formulas and Functions

it works if there is data in the fields but if the fields are blank - it gives me the #incorrect argument

 

=IF([*DEPLOYED Y/N/Daytime]564 = "Yes", "Green", IF(AND([*DEPLOYED Y/N/Daytime]564 <> "No", TODAY() < [*Scheduled Deployment Date]564, "Red", IF(AND([*DEPLOYED Y/N/Daytime]564 = "Daytime Deployment"), "Yellow"))))

 

 

Tags:

Comments

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭

    Do you need one filled in and the other can be blank, or do both need to be populated?

  • Mike Wilday
    Mike Wilday ✭✭✭✭✭✭

    You could wrap the entire formula in an IFERROR... 

    =IFERROR(IF([*DEPLOYED Y/N/Daytime]564 = "Yes", "Green", IF(AND([*DEPLOYED Y/N/Daytime]564 <> "No", TODAY() < [*Scheduled Deployment Date]564, "Red", IF(AND([*DEPLOYED Y/N/Daytime]564 = "Daytime Deployment"), "Yellow")))),"BLANK FIELDS")

    This would alert you that there are blank fields in the row rather than send you an #error message. You could also remove the words Blank Fields to just leave the field blank. 

    Did that work? 

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!