# How to lookup column that is reversed

#### ke9c

##### Board Regular
Hi, I have below problem:
I want to lookup colA result based on ColB entry, but vlookup can only lookup colB as result based on colA, anyone have any idea how to do that? Thanks

ColA ColB
---- ----
A 123
B 456
C 789

### Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

#### jbeaucaire

##### Well-known Member
Options:
1) Reverse your two columns so the VLOOKUP will work.

2) If column B is already sorted ascending, a LOOKUP() will still work:

=LOOKUP(1234, B:B, A:A)

3) If neither option above is viable, the use INDEX/MATCH:

=INDEX(A:A, MATCH(1234, B:B, 0))

##### MrExcel MVP
Hi, I have below problem:
I want to lookup colA result based on ColB entry, but vlookup can only lookup colB as result based on colA, anyone have any idea how to do that? Thanks

ColA ColB
---- ----
A 123
B 456
C 789

If A:B is sorted in ascending order on A and a value like 200 is not associated with any value in the above sample:

=IF(LOOKUP(E2,\$B\$2:\$B\$4)=E2,LOOKUP(E2,\$B\$2:\$B\$4,\$A\$2:\$A\$4),"")

If the ascending order set up does not hold:

=INDEX(\$B\$2:\$B\$4,MATCH(E2,\$A\$2:\$A\$4,0))

Note. E2 houses a look up value like 456.

#### ke9c

##### Board Regular
Thanks, it works amazingly, unlike lookup, will have some errors when lookup. Thanks a lot.

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,168,113
Messages
5,857,453
Members
431,880
Latest member
kar2rost

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back