Weird Formula Help

I have the following columns in my sheet:

  • Is This An Object? (a drop down "Yes" or "No" column)
  • Object #
  • Box #
  • Folder #
  • HW ID

I need a formula for the HW ID column that mirrors the "Object #" IF the "Is This An Object?" cell is "Yes".

However, IF the "Is This An Object?" cell is "No", then I want the HW ID column to display "Box #" PLUS "Folder #".

Thoughts?

Tags:

Best Answers

  • Nic Larsen
    Nic Larsen ✭✭✭✭✭✭
    Answer ✓

    Something like this:

    =IF([Is This An Object]@row = "Yes", [Object #]@row, [Box #]@row + "" + [Folder #]@row)

    Can add a space or a dash if needed between the quotes or take that out depending on needs.

  • Danielle Arteaga
    Danielle Arteaga ✭✭✭✭✭✭
    Answer ✓

    Assuming your sheet set up looks something like this:

    Put this formula in your HW ID column:

    =IF([Is this an Object]@row = "Yes", [Object #]@row, JOIN([Box #]@row:[Folder #]@row))

    Note that this works only if [Box #] and [Folder #] are adjacent columns. If they are not, then you'd need a slightly different syntax:

    =IF([Is this an Object]@row = "Yes", [Object #]@row, ([Box #]@row + [Folder #]@row))

    If you want a delimiter between [Box #] and [Folder #], you can do it like this:

    =IF([Is this an Object]@row = "Yes", [Object #]@row, ([Box #]@row + "-" + [Folder #]@row))

    So your results look like this:

Answers

  • Nic Larsen
    Nic Larsen ✭✭✭✭✭✭
    Answer ✓

    Something like this:

    =IF([Is This An Object]@row = "Yes", [Object #]@row, [Box #]@row + "" + [Folder #]@row)

    Can add a space or a dash if needed between the quotes or take that out depending on needs.

  • Danielle Arteaga
    Danielle Arteaga ✭✭✭✭✭✭
    Answer ✓

    Assuming your sheet set up looks something like this:

    Put this formula in your HW ID column:

    =IF([Is this an Object]@row = "Yes", [Object #]@row, JOIN([Box #]@row:[Folder #]@row))

    Note that this works only if [Box #] and [Folder #] are adjacent columns. If they are not, then you'd need a slightly different syntax:

    =IF([Is this an Object]@row = "Yes", [Object #]@row, ([Box #]@row + [Folder #]@row))

    If you want a delimiter between [Box #] and [Folder #], you can do it like this:

    =IF([Is this an Object]@row = "Yes", [Object #]@row, ([Box #]@row + "-" + [Folder #]@row))

    So your results look like this:

  • Nicole J
    Nicole J ✭✭✭✭

    Thank you, Nic and Danielle. Both of your responses were correct, helpful, and appreciated. Problem solved.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!