Using Excel VB, Update a specific cell, on any change of anotherspecific cell

P

Paul

I would like to have the contents of E19 copied to E20, with E20
completely editable, however if any changes are made to E19, the
contents are again copied over to E20.
I tried with the following code, but doesn't work.

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("E19")) Is Nothing Then
Range("E20") = Range("E19")
End If
End Sub

Any suggestion please?
Thanks and Regards
Paul
 
C

Claus Busch

Hi Paul,

Am Thu, 28 Mar 2013 13:06:52 +0100 schrieb Paul:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("E19")) Is Nothing Then
Range("E20") = Range("E19")
End If
End Sub

for me the procedure works. You can also try:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$E$19" Then [E20] = Target
End Sub

This code must be placed in code module of the sheet.
Right click on sheet tab => Show code.


Regards
Claus Busch
 
P

Paul

Il 28/03/2013 13:16, Claus Busch ha scritto:
Private Sub Worksheet_Change(ByVal Target As Range)
Hallo Claus,
I tried your solution and it works.
I don't know why the first is Ok for you and not works for me. Strange.

Regards and many thanks
Paul
 

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