Hi everyone,
I have text data in the single cell in the following format.
[TABLE="width: 960"]
<tbody>[TR]
[TD="width: 960"]New Advice Requested 242.59 Target Bps, [ Quantity : 3,700, Bps : 0, Target Bps : 242.59 ][/TD]
[/TR]
</tbody>[/TABLE]
I would like to extract the 3 data points in the [ ] brackets into adjacent cells if possible.
1. Quantity
2. Bps
3. Target Bps.
Any help would be greatly appreciated.
Kind regards,
Lewis.
Hi Lewis,
I'm not sure this is the BEST way to do it, but it does work. I tested it with some strings that were longer values and it is still working. You should be sure to check it against a few more of your records to make sure.
Note that the formula is different for each of B1, C1, D1. All can be dragged down to subsequent rows.
Excel 2010
<colgroup><col style="width: 25pxpx"><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: center"]New Advice Requested 242.59 Target Bps, [ Quantity : 3,700, Bps : 0, Target Bps : 242.59 ][/TD]
[TD="align: center"]3,700[/TD]
[TD="align: center"]0[/TD]
[TD="align: center"]242.59[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]New Advice Requested 1235.62 Target Bps, [ Quantity : 15,200, Bps : 28, Target Bps : 1235.62 ][/TD]
[TD="align: center"]15,200[/TD]
[TD="align: center"]28[/TD]
[TD="align: center"]1235.62[/TD]
</tbody>
Sheet4
[TABLE="width: 85%"]
<tbody>[TR]
[TD]
Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: #DAE7F5"]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]B1[/TH]
[TD="align: left"]=MID(
A1,FIND(CHAR(1),SUBSTITUTE(A1,": ",CHAR(1),1))+2,(FIND(CHAR(1),SUBSTITUTE(A1,", ",CHAR(1),2),2))-(FIND(CHAR(1),SUBSTITUTE(A1,": ",CHAR(1),1)))-2)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]C1[/TH]
[TD="align: left"]=MID(
A1,FIND(CHAR(1),SUBSTITUTE(A1,": ",CHAR(1),2))+2,(FIND(CHAR(1),SUBSTITUTE(A1,", ",CHAR(1),3),2))-(FIND(CHAR(1),SUBSTITUTE(A1,": ",CHAR(1),2)))-2)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]D1[/TH]
[TD="align: left"]=MID(
A1,FIND(CHAR(1),SUBSTITUTE(A1,": ",CHAR(1),3))+2,(FIND(CHAR(1),SUBSTITUTE(A1," ]",CHAR(1),1))-2)-(FIND(CHAR(1),SUBSTITUTE(A1,": ",CHAR(1),3))))[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]