Skip to main content
Solved

Two IF formulas

  • August 10, 2022
  • 4 replies
  • 26 views

I currently have this:
DATETIME_FORMAT({Date of donation}, ‘M/D/YYYY’) & “—” & IF({On behalf of corporation?}, {Donor’s employer}, Donor)

I have another field named “Member Donor”. If the Donor field is blank then I want it to pull the Member Donor field.

Best answer by TheTimeSavingCo

Hi Angela, could you try this out?

DATETIME_FORMAT(
  {Date of donation}, 'M/D/YYYY'
) & 
'—' & 
IF(
  {On behalf of corporation?}, 
  {Donor’s employer}, 
  IF(
    {Donor},
    {Donor},
    {Member Donor}
  )
)

Edited to fix the curly quotes issue pointed out by kuovonne!

4 replies

TheTimeSavingCo
Forum|alt.badge.img+31

Hi Angela, could you try this out?

DATETIME_FORMAT(
  {Date of donation}, 'M/D/YYYY'
) & 
'—' & 
IF(
  {On behalf of corporation?}, 
  {Donor’s employer}, 
  IF(
    {Donor},
    {Donor},
    {Member Donor}
  )
)

Edited to fix the curly quotes issue pointed out by kuovonne!


  • Author
  • Participating Frequently
  • August 10, 2022

Hi Angela, could you try this out?

DATETIME_FORMAT(
  {Date of donation}, 'M/D/YYYY'
) & 
'—' & 
IF(
  {On behalf of corporation?}, 
  {Donor’s employer}, 
  IF(
    {Donor},
    {Donor},
    {Member Donor}
  )
)

Edited to fix the curly quotes issue pointed out by kuovonne!


Thank you! At first it gave me an error but when I removed the curly brackets from Donor, it worked! I’m not sure why that table doesn’t pull the curly brackets for that field. Thank you again!


kuovonne
Forum|alt.badge.img+29
  • Brainy
  • August 10, 2022

Hi Angela, could you try this out?

DATETIME_FORMAT(
  {Date of donation}, 'M/D/YYYY'
) & 
'—' & 
IF(
  {On behalf of corporation?}, 
  {Donor’s employer}, 
  IF(
    {Donor},
    {Donor},
    {Member Donor}
  )
)

Edited to fix the curly quotes issue pointed out by kuovonne!


Forum curly quotes strike again! Formulas don’t handle curly quotes ‘ ’ “ ” well. Use straight quotes instead ' ' " "

Sounds like the Angelena solved this on her own though.
(This post is mostly a tip for anyone else who finds this thread.)


TheTimeSavingCo
Forum|alt.badge.img+31

Forum curly quotes strike again! Formulas don’t handle curly quotes ‘ ’ “ ” well. Use straight quotes instead ' ' " "

Sounds like the Angelena solved this on her own though.
(This post is mostly a tip for anyone else who finds this thread.)


Ah man, thanks for this! Have edited my post to fix this issue