Help

Re: IF comparing 3 fields

492 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Cathy_Anderson
6 - Interface Innovator
6 - Interface Innovator
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!

3 Replies 3
Cathy_Anderson
6 - Interface Innovator
6 - Interface Innovator

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. :slightly_smiling_face:

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"))))