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

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Excel 2010
A
1{Low:"100",medium:"300",high:"5000"}
2100
3300
45000
Sheet5
Cell Formulas
RangeFormula
A2=TRIM(MID(SUBSTITUTE(A$1,"""",REPT(" ",100)),(ROW(A1)*200)-100,100))
 
Upvote 0
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
 
Upvote 0
Hello,

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

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

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