Skip to main content

If Blank Statement

  • July 21, 2021
  • 3 replies
  • 32 views

Kim_Cassett
Forum|alt.badge.img+2

Hello- I am a formula novice. I have created a countdown formula to track how many years and months I have before my leases expire. If looks as follows:
({Remaining Term (YRS) (as of today)}& " years, "& Months)

This formula works well, but I cant seem to add a “IF” statement. that if my {Remaining Term (YRS) (as of today" field is blank, i.e., no date, that the formula returns the result “Vacant”

Any help would be appreciated.

This topic has been closed for replies.

3 replies

Kamille_Parks11
Forum|alt.badge.img+27
IF(
   {Remaining Term (YRS) (as of today)},
   {Remaining Term (YRS) (as of today)} & " years, " & Months,
   "Vacant"
)

kuovonne
Forum|alt.badge.img+29
  • Brainy
  • July 21, 2021

If the fields {Remaining Term (YRS) (as of today)} and {Months} are numbers, Kamille’s formula will say “Vacant” when there are 0 years, but still some months.

Here is an alternative formula.

IF(
  OR(
    {Remaining Term (YRS) (as of today)} & "",
    {Months} & ""
  ),
  {Remaining Term (YRS) (as of today)} & " year(s), " & Months & " month(s)",
  "Vacant"
)

Kim_Cassett
Forum|alt.badge.img+2
  • Author
  • New Participant
  • July 21, 2021

Thank you!! These both worked perfectly.