问题
I am trying to do a Lookup in Google Docs that returns the top row of where an item was found. I have attached an example image of my data. The data is in F2:Q25
and I want to supply a number and have it return the corresponding team. For example, if I enter in 1
, I want it to return Team1
. If I enter 79
, I want it to return Team7
(the top row of where the result was found).
Is this possible?
回答1:
Use the principle of mathematical exclusion (find the smallest by adding an astronomical amount to everything that does not match) with the INDEX and MIN functions.
=index(A:Q, 1, min(index(column(F:Q)+($F$2:$Q$13<>C5)*1E+99, , )))
来源:https://stackoverflow.com/questions/39172155/lookup-return-top-row