LEFT() with a VLOOKUP()

almagg

Well-known Member
Joined
Aug 21, 2002
Messages
705
Col G has #s e.g.,

US468
US043
IT008
NL001

The source column has e.g.,

US468: Tyco Marinette Operations
US043: Tigard, OR
IT008: Austria

i want to search the source for the first 5 character match and return the value a number of columns over. i initially wrote this, but it returns the first 5 characters of the value in the 28th column:

=IF(ISNA(LEFT(VLOOKUP(F3,'[TFP nonservice Monthly Hours Matrix (FY11 June).xlsx]report'!$F$6:$AG$161,28,FALSE),5)),"NA",IF(LEFT(VLOOKUP(F3,'[TFP nonservice Monthly Hours Matrix (FY11 June).xlsx]report'!$F$6:$AG$161,28,FALSE),5)=0,AJ3,LEFT(VLOOKUP(F3,'[TFP nonservice Monthly Hours Matrix (FY11 June).xlsx]report'!$F$6:$AG$161,28,FALSE),5)))

no, we do not want to add a column with just the 5 characters, to the source (each month) i.e., as little user interaction as possible.

thanks for any help.
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Col G has #s e.g.,

US468
US043
IT008
NL001

The source column has e.g.,

US468: Tyco Marinette Operations
US043: Tigard, OR
IT008: Austria

i want to search the source for the first 5 character match and return the value a number of columns over. i initially wrote this, but it returns the first 5 characters of the value in the 28th column:

=IF(ISNA(LEFT(VLOOKUP(F3,'[TFP nonservice Monthly Hours Matrix (FY11 June).xlsx]report'!$F$6:$AG$161,28,FALSE),5)),"NA",IF(LEFT(VLOOKUP(F3,'[TFP nonservice Monthly Hours Matrix (FY11 June).xlsx]report'!$F$6:$AG$161,28,FALSE),5)=0,AJ3,LEFT(VLOOKUP(F3,'[TFP nonservice Monthly Hours Matrix (FY11 June).xlsx]report'!$F$6:$AG$161,28,FALSE),5)))

no, we do not want to add a column with just the 5 characters, to the source (each month) i.e., as little user interaction as possible.

thanks for any help.
Try something like this...

=VLOOKUP(F3&"*",...........
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,827
Members
452,946
Latest member
JoseDavid

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