# Sum a changing Value

#### Yalankelo

##### New Member
Hi,

I am currently working on a simulation in excel using and add-on called Crystal ball. What this basically does is change cells depending on a given assumption that is user defined.
What i am looking to do is sum the value of the cell whose value will fluctuate when the simulation runs. Eg. a cell can fluctuate from 3-5 when the simulation runs. Over 10 runs the cell's value is 3,5,3,4,3,5,5,4,3,4. I would like a cell that at the end of the simulation has summed all those values together so would return 39.
Is this even possible??

Cheers,

Yal

### Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

#### Yalankelo

##### New Member
I believe i have found a solution to this problem now.
Within the stack flow of the way crystal ball simulation works you can call specific macros as long as they are named appropriately.
So if i use:

Sub CBAfterRecalc

x = cells(coordinates here)

y = cells(coordinates here)

z = x + y

cells(same coordinates are y) = z

End Sub

Then every time it is called it adds x to y then puts the new number back in to cell y. Works well for me.

Cheers.