ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Two cell accumulator (https://www.excelbanter.com/excel-worksheet-functions/8574-two-cell-accumulator.html)

Bill

Two cell accumulator
 
I can make A1 accumulate to B1, no problem. My question is how do you get
additional cell to accumulate without changing the values in the previous
cells. I would like this to work for multi rows : Example- A1 accumulate to
B1, A2 accumulate to B2, A3 accumulate to B3 and so on. Each row would stand
on it's own.
--
Bill

Bernie Deitrick

Bill,

It would help if you would post how you are doing this: my method would
involve the worksheet's change event:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Target.Column = 1 Then
Target(1, 2).Value = Target(1, 2).Value + Target.Value
End If
End Sub

HTH,
Bernie
MS Excel MVP

"Bill" wrote in message
...
I can make A1 accumulate to B1, no problem. My question is how do you get
additional cell to accumulate without changing the values in the previous
cells. I would like this to work for multi rows : Example- A1 accumulate

to
B1, A2 accumulate to B2, A3 accumulate to B3 and so on. Each row would

stand
on it's own.
--
Bill





All times are GMT +1. The time now is 08:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com