Extracting Information with Formula

shahid5788

Board Regular
Joined
May 24, 2016
Messages
91
Hi,

Can you please assist in providing a formula in which I can extract a part of my raw data line item. Please see below of my raw data and how I want the output to look like. Can you please assist?



RAW DATAWhat I want the formula to provide
100-19-907-BT100
125-03-1266-BT125
149-04-1252-BT149
188-13-908-BT188
316-20-912-BT316
49-01-1213-BT49
740-04-1263-BT740
762-02-1285-BT762
790-02-915-BT790
817-01-BT817
818-01-906-BT818
SOW-100-003-BT100
SOW-645-002-BT645

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

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
For the values that start with text would SOW be the only leading text or are there other possibilities?

If SOW is the only possibility then perhaps:

=LEFT(SUBSTITUTE(SUBSTITUTE(A1,"SOW-",""),"-",REPT(" ",255)),255)+0
 
Last edited:
Upvote 0
Another option, assuming your current example is representative...
A​
B​
C​
1​
RAW DATAYoursMine
2​
100-19-907-BT100100
3​
125-03-1266-BT125125
4​
149-04-1252-BT149149
5​
188-13-908-BT188188
6​
316-20-912-BT316316
7​
49-01-1213-BT4949
8​
740-04-1263-BT740740
9​
762-02-1285-BT762762
10​
790-02-915-BT790790
11​
817-01-BT817817
12​
818-01-906-BT818818
13​
SOW-100-003-BT100100
14​
SOW-645-002-BT645645
C2=SUBSTITUTE(MID(A2,IF(ISNUMBER(--LEFT(A2,1)),1,5),3),"-","")
copied down
 
Upvote 0
Hi,

Thank you Scott it looks like your formula works for me currently but I think I have run into another condition. On top of "SOW" I have couple Raw data with another condition. Can you please assist with you formula.


RAW DATAWhat I want the formula to provide
100-19-907-BT100
125-03-1266-BT125
149-04-1252-BT149
188-13-908-BT188
316-20-912-BT316
49-01-1213-BT49
740-04-1263-BT740
762-02-1285-BT762
790-02-915-BT790
817-01-BT817
818-01-906-BT818
SOW-100-003-BT100
SOW-645-002-BT

Sale-21-02


Sale-285-15

Sale-569-01
645

21

285

569


<tbody>
</tbody>
 
Upvote 0
=left(substitute(mid(a1,min(find({1,2,3,4,5,6,7,8,9,0},a1&"1234567890")),255),"-",rept(" ",255)),255)+0
 
Upvote 0

Forum statistics

Threads
1,215,410
Messages
6,124,755
Members
449,187
Latest member
hermansoa

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