Forum Discussion
CintraProductions
Jan 18, 2022Copper Contributor
Mover de una celda a otra
Hola necesito poder hacer esto: Que cuando escriba por ejemplo en la celda A1 lo que escriba en ella se ponga en la celda B2, pero cuando escriba en la celda B2 tambien se ponga en la celda A1, osea ...
HansVogelaar
Jan 18, 2022MVP
This requires VBA.
Right-click the sheet tab.
Select 'View Code' from the context menu.
Copy the following code into the worksheet module:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.CountLarge > 1 Then Exit Sub
If Not Intersect(Range("A1"), Target) Is Nothing Then
Application.EnableEvents = False
Range("B2").Value = Range("A1").Value
Application.EnableEvents = True
ElseIf Not Intersect(Range("B2"), Target) Is Nothing Then
Application.EnableEvents = False
Range("A1").Value = Range("B2").Value
Application.EnableEvents = True
End If
End Sub
Switch back to Excel.
Save the workbook as a macro-enabled workbook (.xlsm).
Make sure that you allow macros when you open the workbook.