문제

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

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top