Another If Formula

=IF(NOT(ISBLANK([Payment Type]@row)),CONCATENATE([Payment Type]@row,"-",TEXT([Invoice Date]@row,"MM/DD/YY"),"-PD-",TEXT([Posted Date]@row,"MM/DD/YY")),"")

I cant figure out whats wrong with this formula. The column names all work and are named appropriately

Best Answer

  • AdamApexConsultants
    AdamApexConsultants ✭✭✭✭
    Answer ✓

    =IF(NOT(ISBLANK([Payment Type]@row)), [Payment Type]@row + "-" + [Invoice Date]@row + "-PD-" + [Posted Date]@row, "")

    • [Payment Type]@row + "-":
      • Combines the value of [Payment Type]@row with a hyphen.
    • [Invoice Date]@row:
      • Includes the invoice date directly, using the sheet's default date format.
    • "-PD-" + [Posted Date]@row:
      • Adds the prefix -PD- before including the posted date.

Answers

  • AdamApexConsultants
    AdamApexConsultants ✭✭✭✭
    Answer ✓

    =IF(NOT(ISBLANK([Payment Type]@row)), [Payment Type]@row + "-" + [Invoice Date]@row + "-PD-" + [Posted Date]@row, "")

    • [Payment Type]@row + "-":
      • Combines the value of [Payment Type]@row with a hyphen.
    • [Invoice Date]@row:
      • Includes the invoice date directly, using the sheet's default date format.
    • "-PD-" + [Posted Date]@row:
      • Adds the prefix -PD- before including the posted date.

  • Marcela
    Marcela Employee

    Hello Samuel,

    The CONCATENATE and TEXT Functions are not supported in Smartsheet. Use the + operator to concatenate strings and dates directly.

    You can try something like this:

    =IF(NOT(ISBLANK([Payment Type]@row)), [Payment Type]@row + "-" + [Invoice Date]@row + "-PD-" + [Posted Date]@row, "")

    Also, you can check the Smartheet Functions List here.

    Hope this helps!

    Need more information? 👀 | Help and Learning Center
    こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!