# IF comparing 3 fields

Topic Labels: Formulas
911 3
cancel
Showing results for
Did you mean:
6 - Interface Innovator
``````IF({Gift Credit Count},
IF({Gift Credit Count}<{Soft Credit Count}, "Softs",
IF({Gift Credit Count}<{Appeal Credit Count}, "Appeals",

``````

3 fields I need to compare.

I am trying to create a formula comparing
Gift to both Soft and Appeal.
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
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",
``````
18 - Pluto

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:

18 - Pluto

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