Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

# Compare 4 Cells in a row and Return Column name with the highest score

Solved
74 2
cancel
Showing results for
Did you mean:
4 - Data Explorer
Can someone help me out.

I'm want Airtable to return the "Column name" after he compares 4 adjacent cells in the same row.

I expected to be something like...
if(@A>@B AND(@A>@C) AND(@A>@D), "A")
if(@B>@A AND(@B>@C) AND(@B>@D), "B")
if(@C>@A AND(@C>@B) AND(@C>@D), "C")
if(@D>@A AND(@D>@B) AND(@D>@C), "A")

1 Solution

Accepted Solutions
8 - Airtable Astronomer

@Cunwalker , hello! You can try the following formula

``IF(AND(A>B, A>C, A>D), "A", IF(AND(B>A, B>C, B>D), "B", IF(AND(C>A, C>B, D>D), "C", IF(AND(D>A, D>B, D>C), "D", "undefined"))))``
2 Replies 2
8 - Airtable Astronomer

@Cunwalker , hello! You can try the following formula

``IF(AND(A>B, A>C, A>D), "A", IF(AND(B>A, B>C, B>D), "B", IF(AND(C>A, C>B, D>D), "C", IF(AND(D>A, D>B, D>C), "D", "undefined"))))``
4 - Data Explorer

Yep, that worked 🥇