Is it possible to fix the direction of Excel's range object?

≡放荡痞女 提交于 2021-01-07 02:41:16

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!