Gr8. But Mr. Luke I gave an instance, I have multiple nos in the same pattern in one cell like this one:You have two unique pieces of info in single cell. Don't do that.
We could use Text-to-columns to split the data apart, using the "~" and space as delimiters. This will put one piece of info in each cell, and also convert the text to numbers. Then you could easily add the numbers.
Or, if you really want to go down this path...
=LEFT(A2,FIND("~",A2)-1)+MID(A2,FIND(" ",A2)+1,999)
Dear Sir,Say your string is in A1
Go to the Formula Tab - Click Define Name - Enter a name ( say Test)
In "Refers to" enter the following =EVALUATE(SUBSTITUTE(TRIM(SUBSTITUTE(Sheet1!$A1,"~"," "))," ","+"))
click OK
In B1 enter =Test
That's it
Oh yes : remember to save your file as XLSM, NOT as XSLX
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
SumOfText = Table.AddColumn(Source, "SumOfText", each List.Sum(List.Transform(Value.FromText(Text.Split([Values],"~~ ")), each Number.FromText(_)))),
#"Removed Columns" = Table.RemoveColumns(SumOfText,{"Values"})
in
#"Removed Columns"