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 do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

sheetspread

Well-known Member
Joined
Sep 19, 2005
Messages
5,138

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))
 

Takae

Well-known Member
Joined
Jul 1, 2015
Messages
791
Platform
  1. Windows
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,171,060
Messages
5,873,526
Members
432,982
Latest member
meepio

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