Formula - vlookup

Roses8

Active Member
Joined
Aug 4, 2005
Messages
348
Hi, Im trying to do a vlookp but with wrong results.

look up the value in B2 and match in column B in sheet 2, if they match then take the name from Column A in the same row should be the result.

=VLOOKUP(B2,Sheet2!A:B,2,1)

Thanks. :)
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
For VLOOKUP to work, the value you are searching for needs to be in the left column of the table you are searching. It will not work if you are searching column B and trying to return a value to the left of it.
 
Upvote 0
Roses8 said:
Hi, Im trying to do a vlookp but with wrong results.

look up the value in B2 and match in column B in sheet 2, if they match then take the name from Column A in the same row should be the result.

=VLOOKUP(B2,Sheet2!A:B,2,1)

Thanks. :)

If Sheet2!A:B is sorted on column B in ascending order and maintained in that order...

=LOOKUP(B2,Sheet2!B:B,Sheet2!A:A)

If not sorted...

=INDEX(Sheet2!A:A,MATCH(B2,Sheet2!B:B,0))
 
Upvote 0

Forum statistics

Threads
1,214,987
Messages
6,122,614
Members
449,090
Latest member
vivek chauhan

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