- Excel Version
- 2011
- 2010
- 2007
Hello,
So this is my first Excel Article and I find it super informative for someone beginners like me who have to go through all the post of legends like @Aladin Akyurek @Eric W and many more to learn something new. So I thought i should write something looking at the recent post of Eric W
So Lets get Started,
In vlookup we have always known that the criteria or the Lookup value should always be on the left hand side of the Table array to return the value say
But here is the trick, We can trick vlookup using functions like "if" and "choose'' to return values without keeping the criteria on the leftmost side of table. Which means the criteria column can be in any order to return the value as it is done in "lookup" formula
Consider this
So i have lookup value or the criteria in the rightmost side of the table array. What we did was we would create a helper column in the leftmost side and copy the lookup criteria and did the lookup.
Now we can skip this old-fashioned method with using if and choose function. So here's the example
The trick using if function i have learnt from @shaowu459 . It was amazing
Hope it might help someone like me who are beginners like me.
So this is my first Excel Article and I find it super informative for someone beginners like me who have to go through all the post of legends like @Aladin Akyurek @Eric W and many more to learn something new. So I thought i should write something looking at the recent post of Eric W
So Lets get Started,
In vlookup we have always known that the criteria or the Lookup value should always be on the left hand side of the Table array to return the value say
SALES RETURN 2020 (1).xlsx | ||||||
---|---|---|---|---|---|---|
C | D | E | F | |||
4 | Lookup Value | Area | Marks | |||
5 | Punit | Rowta | 10 | |||
6 | Ankit | Mangaldai | 11 | |||
7 | Neha | Silchar | 12 | |||
8 | ||||||
9 | ||||||
10 | Ankit | 11 | ||||
11 | ||||||
12 | =VLOOKUP(C10,C4:E7,3,0) | |||||
13 | ||||||
14 | ||||||
15 | ||||||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
E10 | E10 | =VLOOKUP(C10,C4:E7,3,0) |
E12 | E12 | =FORMULATEXT(E10) |
But here is the trick, We can trick vlookup using functions like "if" and "choose'' to return values without keeping the criteria on the leftmost side of table. Which means the criteria column can be in any order to return the value as it is done in "lookup" formula
Consider this
So i have lookup value or the criteria in the rightmost side of the table array. What we did was we would create a helper column in the leftmost side and copy the lookup criteria and did the lookup.
Now we can skip this old-fashioned method with using if and choose function. So here's the example
SALES RETURN 2020 (1).xlsx | |||||
---|---|---|---|---|---|
C | D | E | |||
15 | Area | Marks | Lookup Value | ||
16 | Rowta | 10 | Punit | ||
17 | Mangaldai | 11 | Ankit | ||
18 | Silchar | 12 | Neha | ||
19 | |||||
20 | Using if | ||||
21 | |||||
22 | Ankit | 11 | |||
23 | =VLOOKUP(C22,IF({1,0},E16:E18,D16:D18),2,0) | ||||
24 | |||||
25 | using choose function | ||||
26 | |||||
27 | Ankit | 11 | |||
28 | =VLOOKUP(C27,CHOOSE({1,2},E16:E18,D16:D18),2,0) | ||||
29 | |||||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
D22 | D22 | =VLOOKUP(C22,IF({1,0},E16:E18,D16:D18),2,0) |
D23,D28 | D23 | =FORMULATEXT(D22) |
D27 | D27 | =VLOOKUP(C27,CHOOSE({1,2},E16:E18,D16:D18),2,0) |
The trick using if function i have learnt from @shaowu459 . It was amazing
Hope it might help someone like me who are beginners like me.