Replace cell value with cell answer

F

Flying_Dutcman

I need to have a collum A1 equaling the sum of collum B1 and C1. When I have
the answer in A1 and I type new value in B1 or C1, A1 must increase its value
by the number added. eg, B1 20 C1 30 A1 50. Now I change B1 to 30 and A1
gives me 80. Can this be done?
 
R

Ron de Bruin

Hi Flying_Dutcman

Only with VBA code ( change event )

Copy this event in the sheet module in a test workbook

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 2 Or Target.Column = 3 Then
Cells(Target.Row, 1).Value = Cells(Target.Row, 1).Value + Target.Value
End If
End Sub
 
G

Gordon

Flying_Dutcman said:
I need to have a collum A1 equaling the sum of collum B1 and C1. When I
have
the answer in A1 and I type new value in B1 or C1, A1 must increase its
value
by the number added. eg, B1 20 C1 30 A1 50. Now I change B1 to 30 and A1
gives me 80. Can this be done?


I'm not sure what you are saying. What formula have you in A1?
 
G

Gordon


No, because 30 + 30 does NOT = 80. Why should you want to show that 30 + 30
= 80? If you want to do that, then you need to ADD 30 to cell B1 so that
cell B1 reads "20 + 30".
 
Top