Extract Letters or Numbers from one field and look them up in another

MacIndy

New Member
Joined
Dec 30, 2019
Messages
11
Office Version
  1. 2019
Platform
  1. Windows
I'm looking for a formula that can do the following:
Extract Revision or Change #'s from Column D and search for those numbers or letters at the very end of the text string in Column B. Since the text in Column D has been entered inconsistently I'm guessing there needs to be a way to remove the text strings "Rev" and "CHG" and any punctuation found. The remaining characters should hopefully be the Rev or Change Letter or Number.

Then, I would like to search for that letter or number as the last 1 or 2 characters in the text string in Column B to see if it has been added to the Description Text String in Column B. For a variety of reasons, we need the Revision / Change letter / number to also be at the tail end of the Description.

The idea would be to display something like "Not Found" when the Rev of Chg #/letter is not found at the end of the description.

A bonus ability might be to display something like "NA" if the part # in the same row in Column A contains a "_" anywhere in the text string or if the text string TLG exists in the same row in Column A


See below for some sample data:

Compare COBlanketLineDescription_to_Item.xlsx
ABCD
1ItemDescriptionUnit WeightRevision
2461..CORE PIN0CHG. 0
3546RESERVE0
42662..WASHER FAN CLAMP0REV. C
53197DUMMY D# FOR COPY ITEMS0
63204DUMMY D# FOR COPY ITEMS0
73725DUMMY D# FOR COPY ITEMS0
83726DUMMY D# FOR COPY ITEMS0
93785DUMMY D# FOR COPY ITEMS0
104038..DOWEL PIN0
114118..WASHER CORK 7147250REV. A
124162RESERVE0
134164..SCREW KNOB ADJ. 5158351 REV-C1REV. C
144420..RETAINER (SEAL) 4964350NO REV.
155102..GASKET FAN (496445)0.05
165127..SPACER 51685640REV. B
175501..GASKET (496450)0
186701..RETAINER (496464)0.05REV. 0
196702..WASHER (496465)0REV. A
206703..CORK WASHER (496466)0.002
218560..GASKET FAN L716T0CHG. H
228561..IMPELLER (OIL)0REV. G
2310173..WASHER0.446REV. A
2416193..WASHER0CHG. C
2519564..BEARING SPACER0REV. C
2632984RESERVE0
2741884..w&s part number 1155200
2865151..SF-SLEEVE REV 10.7REV. 1
2967530..SPINDLE 8351268 REV 19REV. 1
3067531..SPINDLE 8351269 REV 112REV. 1
3190851..RING0REV. B
3290915..F CONVERT 65087 INTO 90915100
3391323.BL CARRIER-PLANET - BLANK184
3491479..SF GEAR0CHG. 2
35101576..HUB0
36101577..SPINDLE (496511)2.97REV. Q
37103280..PULLEY CHAIN0REV. A
38104297..SCREW ADJUSTABLE 51251370.38
39104537..BEARING TRW_MRC5306_CF0
40104726..WASHER CHG E0CHG. E
41105566..HUB0C
42105567..BRACKET 51583500E
432V7344_CASTING.C DUCTILE IRON 1E035655CHG. 09
442V9352..CASE ASSEMBLY101
452W0572..ELBOW CHG 00100
462W0572_CASTING.C 1E0020 GREY IRON CASTING11.7
472W0572_TLG..T FIXTURES M.C. HOLDING0
482W0572_TOOLING.TLG RE-RIGG EXISTING TOOLING0
492W3261..MANIFOLD-EXHAUST CHG 550.25
502W3261_CASTING.C 1E0628 DCTL IRON CASTING55CHG. 05
512W3261_TLG..TOOLING/FIXTURES0
522W3261_TOOLING.TLG RE-RIGG PATTERN05
532W5096..BRACKET CHG 819.358
542W5096_CASTING.C DUCTILE IRON SAE D451220.82CHG. 08
552W5244..SHAFT02
562W7087RESERVE0
572W8274RESERVE0
582W8494_CASTING.C GRAY IRON 1E0018 SAE G30008.5
592W9172..ADAPTER-AIR CLEANER CHG 001.690
602W9172_CASTING.C 1E0485 SAE 326 ALUM CASTING1.80
612W9172_TLG..TOOLING/FIXTURE0
622Y4678..TUBE02
632Y8743RESERVE0
643065621_BLAST.BLST BLAST TO REMOVE SCALE7.86
653065621_CH.CH CARBORIZE AND HARDEN5
663065621_OM.OM ISOTROPIC FINISH PER B/P0
673065622_BLAST.BLST BLAST TO REMOVE RUST9.66
683065622_CH.CH CARBORIZE AND HARDEN7
693065622_OM.OM ISOTROPIC FINISH PER B/P6.5
703065623_BLAST.BLST BLAST TO REMOVE SCALE11.6
713065623_CH.CH CARBORIZE AND HARDEN11.6
723065623_OM.OM ISOTROPIC FINISH PER B/P9
733065624_BLAST.BLST BLAST TO REMOVE SCALE15.36
743065624_CH.CH CARBORIZE AND HARDEN12
753065624_OM.OM ISOTROPIC FINISH PER B/P0
763100811_TLG.TLG PPAP COSTS0
773102129_CASTING.C 1E0018 GREY IRON CASTING383
783102129_PNT.PNT 1E2731A CAT YELLOW38
793102129_TLG..TLG FIXTURE/TOOLING RE-RIGG PATTERN0
803102129_TOOLING.TLG RE-RIGG PATTERN03
813106159_BLAST.BLST BLAST TO REMOVE SCALE8.8
823106159_CH.CH CARBORIZE AND HARDEN8.275
833106159_FORGING.F 1E1120 STEEL FORGING W/HNM11.2
843106159_GRIND.GRD GRIND (4) JOURNALS0
853106159_HNM.HNM HIGH TEMP NORMALIZE11.2
863106159_MAG.MAG MANAFLUX FOR CRACKS8
873106159_OM.OM ISOTROPIC FINISH8.8
883123599_BLANK.B SAE 1026 BLANK RING TO DWG1,240.00
893123599CC_BLANK.B SAE 1026 CON-CAST BLANK RING TO DWG1,850.00
903161974_BAL.B BALANCE PER B/P0CHG. 01
913161974_CASTING.C 1E1122 DCTL IRON CASTING0CHG. 01
923161974_RING..R RE-WORK RING0
933161974_TET.TET CUT SPLINE PER B/P0
943161974_TLG..TLG SPLINE/FIXTURE/BAL ARBOR0
953161974_TOOLING.TLG SPLINE CUTTERS/FIXTURES0
963178373_CASTING.C 1E0018 GREY IRON CASTING33.6
973178373_TLG..T NEW PATTERN EQUIPMENT0
983178373_TOOLING.TLG NEW PATTERN EQUIPMENT0
993204410_TLG..TLG MACHINE-WELD FIXTURES0
1003204410_WLD.WLD WELD PER PRINT0
1013204412_BLANK.B 8" SQUARE SAE 4140 1E05090
1023204413_WLD.WLD WELD PER PRINT0
1033204415_BLANK.B 1E0170 6 1/2" X 3 3/4" X 3 3/4" OAL0
1043204ADUMMY D# FOR COPY ITEMS0
1053204BDUMMY D# FOR COPY ITEMS0
1063257477_CASTING.C 1E0596A DCTL IRON CASTING97.4
1073257477_IH.IH FLAME HDN PER 1E0399A0
1083257477_PNT.PNT CAT YELLOW PAINT0
1093303501_CASTING.C 1E0018 GREY IRON CASTING1451
1103303501_PNT.PNT 1E2731A CAT YELLOW1451
1113303501_TLG..TLG FIXTURE/TOOLING RE-RIGG PATTERN0
1123303501_TOOLING.TLG RE-RIGG PATTERN01
MRExcel
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Is "CHG 00" the same as "CHG 0" ?
Yes, unfortunately. When we report what we have shipped to our customer we report all change codes through EDI as 2 digit codes. So, technically, all "0" should be"00" and "1" should be "01", but for now I would be happy just getting a comparison between the two fields.
 
Upvote 0
Is this even close?

Book52
ABCDEF
1ItemDescriptionUnit WeightRevision
2461..CORE PIN0CHG. 0  
3546RESERVE0  
42662..WASHER FAN CLAMP0REV. C  
53197DUMMY D# FOR COPY ITEMS0  
63204DUMMY D# FOR COPY ITEMS0  
73725DUMMY D# FOR COPY ITEMS0  
83726DUMMY D# FOR COPY ITEMS0  
93785DUMMY D# FOR COPY ITEMS0  
104038..DOWEL PIN0  
114118..WASHER CORK 7147250REV. A  
124162RESERVE0  
134164..SCREW KNOB ADJ. 5158351 REV-C1REV. C REV. C
144420..RETAINER (SEAL) 4964350NO REV.  
155102..GASKET FAN (496445)0.05  
165127..SPACER 51685640REV. B  
175501..GASKET (496450)0  
186701..RETAINER (496464)0.05REV. 0  
196702..WASHER (496465)0REV. A  
206703..CORK WASHER (496466)0.002  
218560..GASKET FAN L716T0CHG. H  
228561..IMPELLER (OIL)0REV. G  
2310173..WASHER0.446REV. A  
2416193..WASHER0CHG. C  
2519564..BEARING SPACER0REV. C  
2632984RESERVE0  
2741884..w&s part number 1155200  
2865151..SF-SLEEVE REV 10.7REV. 1 REV. 1
2967530..SPINDLE 8351268 REV 19REV. 1 REV. 1
3067531..SPINDLE 8351269 REV 112REV. 1 REV. 1
3190851..RING0REV. B  
3290915..F CONVERT 65087 INTO 90915100  
3391323.BL CARRIER-PLANET - BLANK184  
3491479..SF GEAR0CHG. 2  
35101576..HUB0  
36101577..SPINDLE (496511)2.97REV. Q  
37103280..PULLEY CHAIN0REV. A  
38104297..SCREW ADJUSTABLE 51251370.38  
39104537..BEARING TRW_MRC5306_CF0_ found  
40104726..WASHER CHG E0CHG. E CHG. E
41105566..HUB0C  
42105567..BRACKET 51583500E  
432V7344_CASTING.C DUCTILE IRON 1E035655CHG. 09  
442V9352..CASE ASSEMBLY101  
452W0572..ELBOW CHG 00100 0
462W0572_CASTING.C 1E0020 GREY IRON CASTING11.7  
472W0572_TLG..T FIXTURES M.C. HOLDING0  
482W0572_TOOLING.TLG RE-RIGG EXISTING TOOLING0TLG found 
492W3261..MANIFOLD-EXHAUST CHG 550.25 5
502W3261_CASTING.C 1E0628 DCTL IRON CASTING55CHG. 05  
512W3261_TLG..TOOLING/FIXTURES0  
522W3261_TOOLING.TLG RE-RIGG PATTERN05TLG found 
532W5096..BRACKET CHG 819.358 8
Sheet1
Cell Formulas
RangeFormula
E2:E53E2=IF(ISNUMBER(FIND("_",B2)),"_ found ",IF(ISNUMBER(FIND("TLG",B2)),"TLG found",""))
F2:F53F2=IF(ISBLANK(D2),"",IF(ISERROR(FIND(SUBSTITUTE(D2,".",""),RIGHT(SUBSTITUTE(B2,"-"," "),LEN(D2)))),"",D2))
 
Upvote 0
Thank you for working on this. Its very close, I think. For the first formula I updated the column from B to A.

The second formula that compares D to B works. I would probably just add putting "N/A" in column E if Column D is blank.

Now that I have seen the results of data filtered with your formula I can see that I may need another side to the second formula that tells me when a CHG or REV is found in Column B but isn't in Column D
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,187
Members
452,616
Latest member
intern444

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