Text to column formula

Excellent865

New Member
Joined
Jan 30, 2018
Messages
4
Hello,

I am looking for a way to extract a number from a string or text, symbols and numbers. For example I have the following in A1

{Low:”100″,medium:”300″,high:”5000″}

I would like to take the low number in A2, the medium number in A3 and the high number in A4.

I have tried a series of mid(Len) formulas but as it counts the number of characters, if my number is a varying number of digits it will only take the first numbers.

I am looking for something similar to text to columns as the symbols will stay the same but as a formula.

I would really appreciate any help!
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

sheetspread

Well-known Member
Joined
Sep 19, 2005
Messages
5,120
<b>Excel 2010</b><table cellpadding="2.5px" rules="all" style=";background-color: rgb(255,255,255);border: 1px solid;border-collapse: collapse; border-color: rgb(187,187,187)"><colgroup><col width="25px" style="background-color: rgb(218,231,245)" /><col /></colgroup><thead><tr style=" background-color: rgb(218,231,245);text-align: center;color: rgb(22,17,32)"><th></th><th>A</th></tr></thead><tbody><tr ><td style="color: rgb(22,17,32);text-align: center;">1</td><td style=";">{Low:"100",medium:"300",high:"5000"}</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">2</td><td style="text-align: right;;">100</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">3</td><td style="text-align: right;;">300</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">4</td><td style="text-align: right;;">5000</td></tr></tbody></table><p style="width:4.8em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid rgb(187,187,187);border-top:none;text-align: center;background-color: rgb(218,231,245);color: rgb(22,17,32)">Sheet5</p><br /><br /><table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: rgb(255,255,255)" ><tr><td style="padding:6px" ><b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: rgb(255,255,255);border-collapse: collapse; border-color: rgb(187,187,187)"><thead><tr style=" background-color: rgb(218,231,245);color: rgb(22,17,32)"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: rgb(218,231,245);color: rgb(22,17,32)">A2</th><td style="text-align:left">=TRIM(<font color="Blue">MID(<font color="Red">SUBSTITUTE(<font color="Green">A$1,"""",REPT(<font color="Purple">" ",100</font>)</font>),(<font color="Green">ROW(<font color="Purple">A1</font>)*200</font>)-100,100</font>)</font>)</td></tr></tbody></table></td></tr></table><br />
 

Takae

Well-known Member
Joined
Jul 1, 2015
Messages
725
UDF
A2 =IFERROR(smp($A$1,ROW(A1)),"")

Code:
Function smp(ByVal txt As String, ByVal ref As Long) As String
With CreateObject("VBScript.RegExp")
    .Pattern = ("\d+")
    .Global = True
    smp = .Execute(txt)(ref - 1)
End With
End Function
 

Excellent865

New Member
Joined
Jan 30, 2018
Messages
4
Hello,

Thank you for the response. When I enter this, I get an empty answer. Do you have any other ideas?
 

Excellent865

New Member
Joined
Jan 30, 2018
Messages
4
Hello,

Thank you for the response. I am looking for a solution that does not involve a macro.
Do you have any other recommendations?
 

Forum statistics

Threads
1,136,845
Messages
5,678,092
Members
419,742
Latest member
Dropzyl88

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
Top