Hello, I want to link two cells (or better yet - two columns) together so that when one changes the other is updated and vice versa. Both are in the same worksheet.
I would like to do this so that the user could input a value in either cell and the other would be updated automatically.
For example, one column would hold the values in meters and the other in inches. A user inputs a value in either cell and the second one is updated accordingly. I hope I've made it clear about what my problem is
Currently I'm trying to use this code:
Private Sub Copy(ByVal Sh As Object, ByVal Target As Range)
If ActiveSheet.Name = "DS" And _
Range("C2").Value <> DSC Then
Sheets("DS").Range("D2").Value = _
Sheets("DS").Range("C2").Value
DSC = Sheets("DS").Range("C2").Value
ElseIf ActiveSheet.Name = "DS" And _
Range("D2").Value <> DSD Then
Sheets("DS").Range("C2").Value = _
Sheets("DS").Range("D2").Value
DSD = Sheets("DS").Range("D2").Value
End If
End Sub
with Public DSC, DSD in Module1 but it doesn't work.
I would like to do this so that the user could input a value in either cell and the other would be updated automatically.
For example, one column would hold the values in meters and the other in inches. A user inputs a value in either cell and the second one is updated accordingly. I hope I've made it clear about what my problem is
Currently I'm trying to use this code:
Private Sub Copy(ByVal Sh As Object, ByVal Target As Range)
If ActiveSheet.Name = "DS" And _
Range("C2").Value <> DSC Then
Sheets("DS").Range("D2").Value = _
Sheets("DS").Range("C2").Value
DSC = Sheets("DS").Range("C2").Value
ElseIf ActiveSheet.Name = "DS" And _
Range("D2").Value <> DSD Then
Sheets("DS").Range("C2").Value = _
Sheets("DS").Range("D2").Value
DSD = Sheets("DS").Range("D2").Value
End If
End Sub
with Public DSC, DSD in Module1 but it doesn't work.