Vlookup using isnumber and right

mrwiley

Board Regular
Joined
Sep 10, 2012
Messages
59
Good day,

I am stumped once again and I'd like to know if someone could share some incite to the realm of possibility.

I need to look up a part # based on a completely different number. However my "part #'s" have process codes at the end.

For example - part # 12-4567*05S goes with part number ABCDEF

I have a list of parts in Column A - but data set in "sheet2" which has in Column B the part I need to call but the "child part" with the *05S in column F with over 12K rows.

In the list Column F has all kinds of *412 *305 *601 parts but I only want the *05S parts.

I have tried =IF(ISNUMBER(SEARCH("8-*",Sheet2!$F:$F,1)),VLOOKUP('ASSEMBLY PART'!$A2,Sheet2!$C:$F,4,0),"") - it results in nothing (worked for another line but the dataset was different.

I have tried "OR(RIGHT($A19,3)={"05S","412","502","205"}))" but this only works for parts within the same sheet and doesn't look for parts in the data set.

I have tried - =IF(ISNUMBER(SEARCH("3-*",Sheet2!$F:$F,RIGHT(Sheet2!$F20:$F12018,3)="05S")),VLOOKUP('ASSEMBLY PART'!$A20,Sheet2!$C:$F,4,0),"") but it results in nothing.

My parts in Column F on sheet2 start with 3- 4- 8- and end with *05S etc.

Any ideas would be awesome.
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
how about this

if you are going to search for 3- then it is actually NOT a number

ISTEXT would work

looking at 3-111 with this will force =ISNUMBER(--LEFT(E10,1)) to TRUE, but only because I am using 1 digit and not 2
 
Upvote 0
how about this

if you are going to search for 3- then it is actually NOT a number

ISTEXT would work

looking at 3-111 with this will force =ISNUMBER(--LEFT(E10,1)) to TRUE, but only because I am using 1 digit and not 2

Thank you, this didn't work... L (
 
Upvote 0
if you are going to search for 3- then it is actually NOT a number

ISTEXT would work
Although "3-" is not a number, SEARCH("3-*",.. will be a number (or error), but never Text


mrwiley
From your description I cannot understand well enough your layout or requirement.
Any chance you could post a small set of dummy data from each worksheet (& the expected results) and explain again in relation to that sample data?
My signature block below has a link to help with how you can do that so we can copy/paste your sample data to test with.
 
Upvote 0
Although "3-" is not a number, SEARCH("3-*",.. will be a number (or error), but never Text


mrwiley
From your description I cannot understand well enough your layout or requirement.
Any chance you could post a small set of dummy data from each worksheet (& the expected results) and explain again in relation to that sample data?
My signature block below has a link to help with how you can do that so we can copy/paste your sample data to test with.


OK, I need to lookup ABC372C and only find the part in column F with a *05S (Column F has many different parts *412 *502 *601 *MAT) - each part will have 2 *05S numbers (right part number and left part number but go into 1 assembly) What you don't see is the 4- part number.

Hope this makes it easier. Thank you
Code:
[TABLE="width: 509"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]BMLITM[/TD]
[TD]BMUM[/TD]
[TD]BMUNCS[/TD]
[TD]BMAITM[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]ABC372C[/TD]
[TD]EA[/TD]
[TD="align: right"][/TD]
[TD]3-131#EBJ23M*05S[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]ABC372C[/TD]
[TD]EA[/TD]
[TD="align: right"][/TD]
[TD]8-725#PTJ61*05S[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]ABDC168[/TD]
[TD]EA[/TD]
[TD="align: right"][/TD]
[TD]3-555#EBJ797M*05S[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]ABDC168[/TD]
[TD]EA[/TD]
[TD="align: right"][/TD]
[TD]8-333#ETJ644*05S[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Hope this makes it easier.
Well, I'm not sure - it didn't quite fit the request of ..
.. data from each worksheet (& the expected results)
Anyway, see if this is the sort of thing you want.
If it isn't, which is quite likely, please give samples from both sheets and the expected results and make sure it is clear which is which.

Formula copied down.

Excel Workbook
CDEFGHI
1BMLITMBMUMBMUNCSBMAITM
2ABC372CEA3-131#EBJ23M*05SABC372C3-131#EBJ23M*05S
3ABC372CEA8-725#PTJ61*05SABDC1683-555#EBJ797M*05S
4ABDC168EA3-555#EBJ797M*05S
5ABDC168EA8-333#ETJ644*05S
Sheet3
 
Last edited:
Upvote 0
Thank you for taking the time to work on this...

I need to call data from the "Sheet2" tab into the "Assembly Part" tab within the workbook.

In Column A on "assembly part" tab I have the assemblies. in Column C "assembly part" tab I want to call the 3- / 4- part numbers with *05S from Column F in Sheet2 tab by using reference to the assembly in Column C in Sheet2 tab. In Column D I want to call 8- part numbers with *05S

The example I provided earlier was Sheet2 data.

I don't know how to get a spread-sheet added to the post without sharing a link from Google Drive. Not sure if this is allowed.

Thanks
 
Last edited:
Upvote 0
you cannot add files, but posting a sample file on a free reputable file share site is acceptable
 
Upvote 0
I don't know how to get a spread-sheet added to the post without sharing a link from Google Drive. Not sure if this is allowed.
That would be allowed but many helpers will not download such files or are prevented from doing so but workplace security restrictions.
Better is to post small copyable screen shots as I have done (my signature block below has help on that) or even what you did in post 5 would have done for 'Assembly Part' as well. :)

Anyway, see if this is better. Note that I have altered the Sheet2 sample data a little and each formula in 'Assembly part is copied down.


Excel 2016
CDEF
1BMLITMBMUMBMUNCSBMAITM
2ABC372CEA3-131#EBJ23M*412
3ABC372CEA8-725#PTJ61*05S
4ABDC168EA4-555#EBJ797M*05S
5ABDC222EA8-333#ETJ644*05S
Sheet2



Excel 2016
ABCD
13-/4-8-
2ABC372CNot found8-725#PTJ61*05S
3ABDC1684-555#EBJ797M*05SNot found
4ABDC222Not found8-333#ETJ644*05S
Assembly Part
Cell Formulas
RangeFormula
C2=IFERROR(INDEX(Sheet2!F$2:F$5,AGGREGATE(15,6,ROW(Sheet2!F$2:F$5)-ROW(Sheet2!F$2)+1/((Sheet2!C$2:C$5=A2)*(RIGHT(Sheet2!F$2:F$5,4)="*05S")*((LEFT(Sheet2!F$2:F$5,2)="3-")+(LEFT(Sheet2!F$2:F$5,2)="4-"))),1)),"Not found")
D2=IFERROR(INDEX(Sheet2!F$2:F$5,AGGREGATE(15,6,ROW(Sheet2!F$2:F$5)-ROW(Sheet2!F$2)+1/((Sheet2!C$2:C$5=A2)*(RIGHT(Sheet2!F$2:F$5,4)="*05S")*(LEFT(Sheet2!F$2:F$5,2)="8-")),1)),"Not found")
 
Last edited:
Upvote 0
Some sample data provided by private link due to sensitive data, but note that I will be responding publicly in the thread per #4 of the Forum Rules

Some comments/question:

1. Your data is very large so in due course I may suggest an alternative approach.

2. One of the main reasons your formulas are failing is that the data in Sheet2 goes down to nearly row 100,000 but the ranges in your formula only go to row 9,263. That is, the formulas are only looking in about 10% of the data. :)

3. The formula you have used in column C will also fail to return the correct result because you altered this part of my formula
=IFERROR(INDEX(Sheet2!F$2:F$5,AGGREGATE(15,6,ROW(Sheet2!F$2:F$5)-ROW(Sheet2!F$2)+1/((Sheet2!C$2:C$5=A2)*(RIGHT(Sheet2!F$2:F$5,4)="*05S")*((LEFT(Sheet2!F$2:F$5,2)="3-")+(LEFT(Sheet2!F$2:F$5,2)="4-"))),1)),"Not found")

In post 7 when you said "I want to call the 3- / 4- part numbers with *05S from Column F in Sheet2", I thought that meant you wanted to look for either a "3-..." part of a "4-... " part. What did that statement actually mean?

4. In column A of 'ASSEMBLY PART' you only have an assembly part number on every third row, with 0 values between. Do you actually want anything returned in columns C & D on the rows that contain 0 in column A? If so, what?
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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