Searching a series of columns for blanks

Josh Jereczek
Josh Jereczek ✭✭
edited 12/09/19 in Formulas and Functions

Hey all.

I am trying to have a column search a series of columns and return the data from the column that is not blank.

I have started with the following:

=IF(NOT(ISBLANK([Title:]1)), [Title:]1, [Peer to Peer Program Title]1)

Which checks the Title column, and if not blank returns the data from Title: column. If the Title: column is blank it returns the value in the Peer to Peer Program Title column.

This works just fine, but I want to go a step further, and if the Peer to Peer Program Title is also blank, I want it to return a value from a third column. I tried to make this work with nested IF statements, but kept getting errors.

 

Thank you!

Comments

  • Brian W
    Brian W ✭✭

    Did you try something like this?

    =IF(NOT(ISBLANK([Title:]1)), [Title:]1, IF(NOT(ISBLANK([Peer to Peer Program Title]1)), [Peer to Peer Program Title]1, [Third Column]1))

  • This works.

    Per usual I had something similar if not that same framework, but must have had a parenthesis out of place, or missed a comma. 

     

    THANK YOU Brian!

     

     

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭

    Depending on how many columns you are looking at, this could get rather huge rather quickly. If you have lets just say 10 columns you were looking across and only one would be populated and you wanted to pull that one single one, you could use

     

    =JOIN(COLLECT([Column 1]@row:[Column 10]@row, [Column 1]@row:[Column 10]@row, NOT(ISBLANK(@cell))))

     

    If there is a possibility of multiple columns having data in them, but you only want to pull one, that would take a little more work and most likely a few screenshots for reference (but it is still doable).

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!