EXTRACTion problem???

excelindianfanclub

Board Regular
Joined
Oct 20, 2012
Messages
64
hi experts,

i have a database in range D4:D1000. But im just posting sample range where i had a problem.i need to extract the mixed values from range D4 to D19 as S.no,Description,Q.ty and Part No. I used Text to Columns but it was not giving exact extraction what i needed.so, i made Formulae as follows


G4(extracting serial no.) =LEFT(D4,SEARCH(" ",D4)-1)
H4(extracting material description) =MID(D4,SEARCH(" ",D4)+1,LEN(D4)-13)
I4(Extracting quantity installed) =MID(D4,LEN(G4)+LEN(H4)+3,1)
J4(Part No.) =RIGHT(D4,8)

<colgroup><col><col></colgroup><tbody>
</tbody>

<colgroup><col><col><col><col><col><col></colgroup><tbody>
</tbody>


here my database

DGHIJ
S.NoDescriptionQ.tyPart No.
41 SHROUD 1 262583681SHROUD126258368
52 CUP WASHER 1 262542222CUP WASHER126254222
63 PLUNGER SPRING 1 546437793PLUNGER SPRING154643779
74 PLUNGER ASSY. 1 262571214PLUNGER ASSY.126257121
85 SOLENOID SWITCH 1 262408365SOLENOID SWITCH126240836
96 SPINDLE ASSY. 1 262407966SPINDLE ASSY.126240796
107 TERMINAL BASE ASSY. 1 262408377TERMINAL BASE ASSY.126240837
118 FIELD COIL ASSY. 1 262583678FIELD COIL ASSY.126258367
129 ARMATURE ASSY. 1 262405669ARMATURE ASSY.126240566
1310 INTER BRACKET ASSY. 1 2625246310INTER BRACKET ASSY. 26252463
1411 ENGAGING LEVER ASSY. 1 2625253411ENGAGING LEVER ASSY. 26252534
1512 DRIVE ASSY. 1 2625393612DRIVE ASSY. 26253936
1613 FIXING BRACKET ASSY. 1 2625393013FIXING BRACKET ASSY. 26253930
1714 BRUSH ASSY. 1 2625640114BRUSH ASSY. 26256401
1815 C.E. BRACKET ASSY. 1 2625286815C.E. BRACKET ASSY. 26252868
1916 ARMATURE KIT 1 2624143416ARMATURE KIT 26241434

<colgroup><col><col><col><col><col><col></colgroup><tbody>
</tbody>

the part number is always eight digits.i able to extract everything but the problem arised when i try to extract the quantity from D13 till the end of my database. The formula was unable to extract the value from mixed value.please help me to extract and also if any other possible solution is available.please share it. thanks in advance.
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
The following looks cumbersome but should work if I understand your data very well

G4 = LEFT(A1,FIND(" ",D4)-1)
H4 = MID(D4,FIND(" ",D4)+1,FIND("*",SUBSTITUTE(D4," ","*",LEN(D4)-LEN(SUBSTITUTE(D4," ",""))-1))-FIND(" ",D4)-1)
I4 = MID(D4,LEN(D4)-9,1)
J4 = RIGHT(D4,8)
 
Upvote 0
This formula should work for you. However you might require few small changes when the qty is more than 1 digit. I suggest try these (worked out on the basis of Momentman formulas:

G1=LEFT(D1,FIND(" ",D1)-1)
H1=MID(D1,FIND(" ",D1)+1,FIND("*",SUBSTITUTE(D1," ","*",LEN(D1)-LEN(SUBSTITUTE(D1," ",""))-1))-FIND(" ",D1)-1)
I1=RIGHT(LEFT(D1,LEN(D1)-9),(LEN(LEFT(D1,LEN(D1)-9))-LEN(G1)-LEN(H1)-2))
J1=RIGHT(D1,8)


The following looks cumbersome but should work if I understand your data very well

G4 = LEFT(A1,FIND(" ",D4)-1)
H4 = MID(D4,FIND(" ",D4)+1,FIND("*",SUBSTITUTE(D4," ","*",LEN(D4)-LEN(SUBSTITUTE(D4," ",""))-1))-FIND(" ",D4)-1)
I4 = MID(D4,LEN(D4)-9,1)
J4 = RIGHT(D4,8)
 
Upvote 0
How about these formulas...

G1: =LEFT(D1,FIND(" ",D1))

H1: =SUBSTITUTE(MID(D1,FIND(" ",D1)+1,999)," "&I1&" "&J1,"")

I1: ==TRIM(LEFT(RIGHT(SUBSTITUTE(" "&D1," ",REPT(" ",999)),1998),999))

J1: =RIGHT(D1,8)
 
Upvote 0
Thanks to Norulen and Rick.. its worked very much. But Rick please explain your approach.im unable to understand.please share your knowledge if you wish.
 
Upvote 0

Forum statistics

Threads
1,215,444
Messages
6,124,893
Members
449,194
Latest member
JayEggleton

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