Muliple lookup

stapuff

Well-known Member
Joined
Feb 19, 2004
Messages
1,126
In sheet Tracker range L3 I have data that looks like the following:

152123; 152124; 152161; 152189

I want to basically vlookup all of the above values in sheet "Data" range O3:O600 and return the value from column X to sheet Tracker M3.

Sheet Data is setup like

ColumnO ColumnX
152123 Jun
152124 Jun
152161 Jul
152189 Sep


So L3 looks like:
152123; 152124; 152161; 152189

Result returns
Jun; Jun; Jul; Sep

Any thought on a formula or vba would be greatly appreciated.

stapuff
 
Hey Domenic -

I appreciate all your help. This is some awesome stuff.

I checked out your website a little.....is it active and something you are posting on quite a bit?

stapuff
 
Upvote 0

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
I modified the project a little and getting some odd behavior. I now have 2 columns in sheet "Champ" that look at sheet "Data" and return back to sheet "Champ" the results in column "T"

Looking for your thoughts.....

On sheet "Champ":

P32 = 154727; 154728; 154739; 154740; 154759; 154760
S32 = 154367

T32 = {=IF(AND(S32="",P32=""),"",SUBSTITUTE(AConcat(IF(Data!$O$2:$O$496<>"",IF(ISNUMBER(FIND(";"&Data!$O$2:$O$496&";",";"&SUBSTITUTE(P32," ","")&";")),"; "&Data!$X$2:$X$496,""),"")&IF(Data!$AB$2:$AB$500<>"",IF(ISNUMBER(FIND(";"&Data!$AB$2:$AB$500&";",";"&SUBSTITUTE(S32," ","")&";")),"; "&Data!$AK$2:$AK$500,""),"")),"; ","",1))}

T32 = #VALUE

Note in the formula above $O$497 and $X$497 if I change them both to $500 and ctrl/shift/enter the formula all works perfect.

The formula range is getting automatically changed when I update the access query on sheet "Data" that provides the information.

Thanks,

Stapuff
 
Upvote 0
If the following formula does not return the desired result, provide a small sample of the source data, along with the criteria, and the actual expected result based on the small sample of data.

=IF(AND(S32="",P32=""),"",SUBSTITUTE(AConcat(IF(Data!$O$2:$O$496<>"",IF(ISNUMBER(FIND(";"&Data!$O$2:$O$496&";",";"&SUBSTITUTE(P32," ","")&";")),"; "&Data!$X$2:$X$496,""),"")),"; ","",1)&"; "&SUBSTITUTE(AConcat(IF(Data!$AB$2:$AB$500<>"",IF(ISNUMBER(FIND(";"&Data!$AB$2:$AB$500&";",";"&SUBSTITUTE(S32," ","")&";")),"; "&Data!$AK$2:$AK$500,""),"")),"; ","",1))

...confirmed with CONTROL+SHIFT+ENTER.
 
Upvote 0
Domenic -

Is there a way to change the following 2 formula's to return results regardless if they are a number or text?

In both columns L & O I get data that looks like

123456; 123457; 123458
or
123456-10; 123456-11; 123456-12

The first group of numbers work (without the dash) the second fail. I tried replacing ISNUMBER with ISTEXT but it did not work. Any suggestion?

Thanks,

Stapuff



=MySum(IF(ISNUMBER(FIND(";"&O_Range&";",";"&SUBSTITUTE(L13," ","")&";")),P_Range))

=IF(AND(O13="",L13=""),"",SUBSTITUTE(AConcat(IF(Load_O_Range<>"",IF(ISNUMBER(FIND(";"&Load_O_Range&";",";"&SUBSTITUTE(L13," ","")&";")),"; "&Load_X_Range,""),"")&IF(Load_AB_Range<>"",IF(ISNUMBER(FIND(";"&Load_AB_Range&";",";"&SUBSTITUTE(O13," ","")&";")),"; "&Load_AK_Range,""),"")),"; ","",1))
 
Upvote 0
As far as I can see, the formula should return the desired result, whether the data contains text or numerical values. Try...

=IF(AND(O13="",L13=""),"",SUBSTITUTE(AConcat(IF(Load_O_Range<>"",IF(ISNUMBER(FIND(";"&Load_O_Range&";",";"&SUBSTITUTE(L13," ","")&";")),"; "&Load_X_Range,""),"")),"; ","",1)&"; "&SUBSTITUTE(AConcat(IF(Load_AB_Range<>"",IF(ISNUMBER(FIND(";"&Load_AB_Range&";",";"&SUBSTITUTE(O13," ","")&";")),"; "&Load_AK_Range,""),"")),"; ","",1))

...confirmed with CONTROL+SHIFT+ENTER.
 
Upvote 0
Domenic -

I appreciate your confirmation that the formula should work. After looking further - there is a space to the left of the "-", which I did not see. I was able to remove the space and it works now.

Thanks for your help again,

Stapuff
 
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,841
Members
452,948
Latest member
UsmanAli786

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