Accumulating a total

J

JD

I have a workbook with 2 columns - the first is this days costs, the second
cost to date. The user needs to input data into todays costs that will then
auto update costs to date - this needs to happen for each entry on the
column.

Can anyone help? Have tried McGimpsey & Associates and the Worksheet
Function
Accumulator (using Circular References) but it doesn't work over several
rows. thanks for your help!
 
T

TomPl

Assume the Days Cost column of data starts in cell A2.
Assume the Cost to Date column of totals starts in cell B2.
Enter the formula =A2 in cell B2.
Enter the formula =B2+A3 in cell B3.
Copy the formula in cell B3 down the column.

That should do it.

Tom
 
J

JD

this won't accumulate - I need entry into A2 reflects a running total in
B2 - all of the time

User inputs 2 into A2, B2 reflects 2. User inputs 3 into A2, B2 reflects 5
etc - I need this for 100 cells in column a and b

thanks again
 
T

TomPl

What you are asking for does not provide any history of orders. If you
accidentally entered a days orders twice, your total would be off and you
would have no record of what it should be.

I don't think what you ask can be done without creating a macro. The macro
to accomplish what you want is as follows:


Private Sub Worksheet_Change(ByVal Target As Range)

Dim t As Range
Dim p As Range

Set t = Target
Set p = Range("A:A")
If Intersect(t, p) Is Nothing Then Exit Sub
Application.EnableEvents = False
t.Offset(0, 1).Value = _
t.Offset(0, 1).Value + t.Value2
Application.EnableEvents = True

End Sub

Any time you enter a value in column A that value will be added to the value
in column B.

Tom
 
G

Gord Dibben

Try reading answers to one or more of the many posts you have on other
newsgroups.


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top