Formula to return the non-blank cell

m_anderson
edited 03/05/25 in Formulas and Functions

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 on the form. I want to create a formula that looks at all the start date columns and returns the one that isn't blank. Then do the same for the end date columns.

Best Answer

  • Jgorsich
    Jgorsich ✭✭✭✭✭
    Answer ✓

    =max([firstOption]@row,[secondOption]@row,[thirdOption]@row)

    Empty values are skipped during max() and min() calculations, so if you are just trying to find the one non-empty cell out of a range (including a disjointed range like yours), just use a max or a min to pull it out. Smartsheet doesn't note the maximum number of ranges that can be separated by commas, but for what it is worth Excel allows you to select up to 255 different values.

Answers

  • Jgorsich
    Jgorsich ✭✭✭✭✭
    Answer ✓

    =max([firstOption]@row,[secondOption]@row,[thirdOption]@row)

    Empty values are skipped during max() and min() calculations, so if you are just trying to find the one non-empty cell out of a range (including a disjointed range like yours), just use a max or a min to pull it out. Smartsheet doesn't note the maximum number of ranges that can be separated by commas, but for what it is worth Excel allows you to select up to 255 different values.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!