IF comparing 3 fields

IF({Gift Credit Count}, 
IF({Gift Credit Count}<{Soft Credit Count}, "Softs",
IF({Gift Credit Count}<{Appeal Credit Count}, "Appeals",
"Gifts"))))

3 fields I need to compare.

Gift, Soft, and Appeal.

I am trying to create a formula comparing
Gift to both Soft and Appeal.
If Gift is larger, than “Gift”
But if the other is larger, than “Soft” or “Appeal”

I am totally lost.
Because the formula above work when “Gift”
has a number above 0
but not when the gift number is 0

and if @Justin_Barrett answers this one too, I am buying you a coffee!

I think I just got it!

IF(OR({Gift Credit Count},{Soft Credit Count},{Appeal Credit Count}),
IF({Gift Credit Count}<{Soft Credit Count}, "Softs",
IF({Gift Credit Count}<{Appeal Credit Count}, "Appeals",
"Gifts")))

Glad that you got it worked out! I was out of the house most of the day yesterday, or I probably would have jumped on this. :slight_smile:

You were not getting a result when the gift number is zero because, Airtable treats the value zero as a “false” value for the IF.

Your workaround with the OR statement will work if there is a non-zero value in at least one of the three fields. However, it produces a blank if all three fields are blank or zero. This may or may not be your desired result.

Another workaround is to check if there is a value in the {Gift Credit Count} at all, including zero.

IF( LEN({Gift Credit Count} & ""), 
IF({Gift Credit Count}<{Soft Credit Count}, "Softs",
IF({Gift Credit Count}<{Appeal Credit Count}, "Appeals",
"Gifts"))))
1 Like

This topic was solved and automatically closed 15 days after the last reply. New replies are no longer allowed.