View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Spiky Spiky is offline
external usenet poster
 
Posts: 622
Default Add cell "50+55+50+50" to give answer 205

On Aug 28, 12:19 pm, shyboy2k
wrote:
I have a cell where I need to keep the amounts separate to show workings
out, but I need this to be then added up in a sum, is there a way to do this
as at present I have to manual work this out and enter in another cell toget
the answer and this leaves too much room for error.


Generally, you put the amounts in different cells and sum them
elsewhere, and that's how people get to see both the list of
individual numbers and the total.

If you always have exactly 4 values to add up, a repetitive series of
VALUE/LEFT & VALUE/MID functions can be used to create a sum from the
text. But I don't think it would be easy to do this.

VBA can, or UDFs written in VBA. I use morefunc, which can be
downloaded from download.com, and it has a function called EVAL that
can do this very easily.

Another alternative is to use the EVALUATE function. But it is tricky
to do so, since you can't actually use EVALUATE in a cell. (go ahead,
try) Try this: Define a Name with this formula:
=EVALUATE(INDIRECT("RC[-1]",FALSE))
Let's call it Special_Sum. Enter the following in these cells:
A1: 50+55+50+50
B1: =Special_Sum

This works if the Sum will always be 1 cell to the right of the
spelled-out text. If it will be somewhere else, you'll have to modify
the RC[-1] reference.