Dec 22, 2019 12:59 AM
I have a table like this:
| level | exp |
I want a formula that outputs the right level when an exp number that is within a range is given. For example:
With an input of 700, the formula should display 2 because the closest available exp value (rounded down) to 700 is 500 and the corresponding level is 2.
With an input of 10,000, the formula should display 5 because the closest available exp value (rounded down) is 7,875 which corresponds to level 5.
With an input of 33,886, it should output 8.
The solution in sheets would be something like (with E2 being the input):
=QUERY(B:A,"select A where B >= "&E2&" order by B limit 1",0)
How is it possible to do this in Airtable? Thanks!
May 22, 2020 08:16 AM
Did you ever find anything out about how to do this? Needing something similar myself…
Jun 30, 2021 06:59 AM
Did you find any solution for this?
Jun 30, 2021 04:45 PM
Welcome to the Airtable community!
The formula field for this situation would be extremely complex and would be very difficult to scale up.
A better approach would be to use a script (either from a button or an automation). Note that scripts did not exist back when this question was first proposed.