问题
My question is based on this one.
In that question, one asks for a kind of search, and I've answered with a VLookup
formula. The answer to that was "I would like to make this work in the reverse order", where I thought "That should be easy: just invert the range where VLookup
runs through", but it seems not to be that simple:
Let's have a look at following two formulas:
=VLookup(E2;$A$2:$B$6;2;FALSE)
=VLookup(E2;$A$6:$B$2;2;FALSE)
Both formulas are treated as equal by Excel, and in fact, why not: in both cases I mention a rectangle, defined by the cells $A$2, $B$2, $A$6 and $B$6, to run through. So, I can't blame Excel for doing twice the same thing.
However, I mean it in another way: in the first formula, I say "Start at row 2 and go to row 6", while in the second formula I say "Start at row 6 and go down to row 2", but Excel seems not to understand this.
I like to say to Excel
"When I give you a range, don't automatically go from up to down, but follow the direction I've given".
Is this possible?
For your information, I'm not looking for an answer on the question I refer to (using index
/match
or vlookup
/choose
or whatever), I'm looking for a general approach on my general question (not only to be used for VLookup
, but also for Match
or other search functions).
来源:https://stackoverflow.com/questions/65127138/is-it-possible-to-fix-the-direction-of-excels-range-object