how do I return a blank cell if source is empty

I have the formula: =([projected cost]@row - [Fedex Charged]@row) / MAX([projected cost]@row:[Fedex Charged]@row)

I can not wrap my head around having the formula return a blank answer and leaving the cell empty if one of the source cells are empty. Not quite understanding how to use either COUNTIF and/or the ISBLANK function.

Answers

  • Sameer Karkhanis
    Sameer Karkhanis ✭✭✭✭✭✭

    Try this:

    =IF(OR(ISBLANK([projected cost]@row), ISBLANK([Fedex Charged]@row)), "", ([projected cost]@row - [Fedex Charged]@row) / MAX([projected cost]@row:[Fedex Charged]@row) )
    
  • lux
    lux ✭✭

    Thanks Sameer. I got it to work with: =IF(ISBLANK([projected cost]@row), "", IF(ISBLANK([Actual Fedex Charge]@row), "", ([projected cost]@row - [Actual Fedex Charge]@row) / MAX([projected cost]@row:[Actual Fedex Charge]@row)))

    but I like your solution better. Less typing.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!