Extracting particular data in substring but location is never the same place

kgarland17

New Member
Joined
Jun 17, 2021
Messages
8
Office Version
  1. 365
Platform
  1. Windows
I have tens of thousands of SKUs and I need to be able to pull a particular attribute from them all into one column but the attribute is never in the same location across all the SKUs.
How does/can one pull a 1-3 digit number w/ the same letter after it?

example: need to extract the bold data
REST-B-AQ-3FD-6Z-32V-DE-XX
VRZA-B-16Z-29SR-1G-HR-XS-XX
DELI-B-XP-F5S-5W-22-BW-155Z-XX
 
Interesting formula! I have not seen VDB() used before. Could it be tweaked in case these are possible?

kgarland.xlsm
AB
10B-000891Z-36Z000891Z
11B6-1E1Z-123Z1E1Z
Sheet1
Cell Formulas
RangeFormula
B10:B11B10=LET(s,TEXTSPLIT(A10,"-"),@FILTER(s,(RIGHT(s)="z")*ISNUMBER(VDB(,,999,0,--LEFT(s,LEN(s)-1))),""))
VDB used to identify whether a number falls between 0 and 999. If yes and the first parameter of VDB is 0 or ommited, VDB returns 0. If yes and the first parameter of VDB is greater than 0, VDB returns values between [0,the first parameter], which means the depreciation caculated between the periods 0~the number we tested. If the number we tested greater than 999, VDB retunrs #NUM! error.
Cell Formulas
RangeFormula
B1:B4B1=VDB(,,999,0,A1)
C1:C4,C6:C9C1=FORMULATEXT(B1)
B6:B9B6=VDB(1,,999,0,A6)
 
Upvote 0

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

Forum statistics

Threads
1,215,328
Messages
6,124,299
Members
449,149
Latest member
mwdbActuary

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