How to lookup column that is reversed

ke9c

Board Regular
Joined
Jul 27, 2010
Messages
75
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

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
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))
 
Upvote 0
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.
 
Upvote 0
Thanks, it works amazingly, unlike lookup, will have some errors when lookup. Thanks a lot.
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,550
Members
449,088
Latest member
davidcom

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top