ellickakudy rajeesh
ellickakudy rajeesh

Reputation: 747

Find sum of a string in excel

I have an excel sheet containing following data pattern.

|date           |expenses           |total |

| 01/03/2014    |50 + 100 +10 + 50  |210   |

ie date, expenses and total are heading and others are the corresponding data. In this sheet I need to calculate the sum of 'expenses' column, that I need display in 'total' column. Is there is any formula like =sum(B2).

Upvotes: 1

Views: 91

Answers (1)

Dmitry Pavliv
Dmitry Pavliv

Reputation: 35853

You can use this simple UDF:

Function eval(expr As String)
    eval = Evaluate(expr)
End Function

and call it like this: =eval(B2).

Note, that length of the expr must be less than or equal to 255 characters.

enter image description here

Upvotes: 2

Related Questions