View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Formula to sum values extracted from string

8.56 2,514.12 3.18 0.35

Assume that string is in cell A1.

Create this named formula
Goto the menu InsertNameDefine
Name: SumString
Refers to:

=EVALUATE(SUBSTITUTE(SUBSTITUTE(
INDIRECT("RC[-1]",0),",","")," ","+"))

OK

Then, enter this formula in **B1** :

=SumString

The SumString formula **must** be entered in the cell to the immediate right
of the cell being evaluated.

--
Biff
Microsoft Excel MVP


"Paul Martin" wrote in message
...
Hi all

I'll preface this by pointing out that I do NOT want to use text to
columns, nor a VBA solution. I'm looking for a formula alternative -
maybe an array formula.

I have a single column of data extracted from a string, which
represents numeric values, single space-separated. The data looks like
this:

8.56 2,514.12 3.18 0.35

What I'd ideally like is a formula that sums each of the four values,
which in the above example would be 2,526.21.

Any suggestions appreciated.