Domanda

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

È stato utile?

Soluzione

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top