Formula needed.

baggarwal

Well-known Member
Joined
Jul 10, 2002
Messages
591
Hi All:

A2 is a column that contains a cost center RMZ00. The range B2 to C6. Contains RMZ00 and a value to the right of it.

In A3, I need a formula that will lookup A2 in range B2:C6 and return the value in column C where the match to column B is found.

Can someone please tell me how this can be done.
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
=VLOOKUP($A$2,$B$2:$C$6,2,FALSE)

should do the trick

kevin
 
Upvote 0
So Sorry:

The lookup value is RMZ00 General, I want to lookup the first five digits in the range defined by B:C. I tried the following formula and it didn't work.

=Vlookup((Left(A2,5),B2:C6,2,False)))
 
Upvote 0
EDITED:

nevermind, use this formula:

=VLOOKUP(LEFT(A2,5),B2:C6,2,FALSE)

otherwise if this doesn't work for you, could you please post a sample of your data?

thanks
kevin
 
Upvote 0
This didn't work.

The Lookup value is RMZ00 General, this is in Cell A2. B2:C6 contains RMZ00 56. I want to find RMZ00 not RMZ00 General in the range B2:C6 and have it return 56.
 
Upvote 0
see my edited post above, i think you were on the right track, your syntax was just wrong

hth
kevin
 
Upvote 0
=VLOOKUP(LEFT(A2,5)&"*",$B$2:$C$6,2,0)

or even...

=VLOOKUP("*"&LEFT(A2,5)&"*",$B$2:$C$6,2,0)

if the lookup value is part of a value in B.
 
Upvote 0

Forum statistics

Threads
1,221,691
Messages
6,161,322
Members
451,696
Latest member
Senthil Murugan

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