ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Replace cell value with cell answer (https://www.excelbanter.com/excel-discussion-misc-queries/100517-replace-cell-value-cell-answer.html)

Flying_Dutcman

Replace cell value with cell answer
 
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?

Ron de Bruin

Replace cell value with cell answer
 
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

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Flying_Dutcman" wrote in message
...
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?




Gordon

Replace cell value with cell answer
 
"Flying_Dutcman" wrote in message
...
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?



Flying_Dutcman

Replace cell value with cell answer
 
=(b1+c1)

"Gordon" wrote:

"Flying_Dutcman" wrote in message
...
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?




Gordon

Replace cell value with cell answer
 
"Flying_Dutcman" wrote in message
...

"Gordon" wrote:

"Flying_Dutcman" wrote in
message
...
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?




=(b1+c1)


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".




All times are GMT +1. The time now is 07:02 PM.

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