Replacing value in cell with answer of same cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to replace the value in A1 with the entered value in B1. eg, A1=20;
B1=20 now I type 30 into B1 and A1=50. Is this at all posibble? Please help?
 
Hi
Try this code:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B$1" Then
Range("A1").Value = Range("A1").Value + Range("B1").Value
End If
End Sub

you have to write this code to "Work sheet module"
 

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

Back
Top