Shared content between 2 cells on 1 sheet and on 2 sheets
Solved/Closed
Pupic4fun
-
Updated on Aug 30, 2021 at 11:37 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Aug 30, 2021 at 11:32 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Aug 30, 2021 at 11:32 AM
Related:
- Shared content between 2 cells on 1 sheet and on 2 sheets
- Tentacle locker 2 - Download - Adult games
- Need for speed: most wanted 2005 downloadable content - Download - Racing
- Summertime saga downloadable content - Download - Adult games
- Fnia 2 - Download - Adult games
- Euro truck simulator 2 download free full version pc - Download - Simulation
3 responses
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
Aug 17, 2021 at 11:50 AM
Aug 17, 2021 at 11:50 AM
Hi Pupic4fun,
Right-click your sheets tab and select 'View code' and paste the code below in the big white field that pops up:
Best regards,
Trowa
Right-click your sheets tab and select 'View code' and paste the code below in the big white field that pops up:
Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Range("A1"), Target) Is Nothing Then Application.EnableEvents = False Range("B1").Value = Target.Value End If If Not Intersect(Range("B1"), Target) Is Nothing Then Application.EnableEvents = False Range("A1").Value = Target.Value End If Application.EnableEvents = True End Sub
Best regards,
Trowa
thanks,
It's working perfect for 1 sheet
what can you do if you have A1 on sheet1 and B1 on sheet2?
thank you in advance
It's working perfect for 1 sheet
what can you do if you have A1 on sheet1 and B1 on sheet2?
thank you in advance
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
Aug 30, 2021 at 11:32 AM
Aug 30, 2021 at 11:32 AM
Hi Pupic4fun,
Then you will need to add a code to each of the 2 sheets.
Code for sheet1:
Code for sheet2:
Make sure your sheet names match those on code line 5 in both codes.
Best regards,
Trowa
Then you will need to add a code to each of the 2 sheets.
Code for sheet1:
Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Range("A1"), Target) Is Nothing Then Exit Sub If Target.Cells.Count > 1 Then Exit Sub Application.EnableEvents = False Sheets("Sheet2").Range("B1").Value = Target.Value Application.EnableEvents = True End Sub
Code for sheet2:
Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Range("B1"), Target) Is Nothing Then Exit Sub If Target.Cells.Count > 1 Then Exit Sub Application.EnableEvents = False Sheets("Sheet1").Range("A1").Value = Target.Value Application.EnableEvents = True End Sub
Make sure your sheet names match those on code line 5 in both codes.
Best regards,
Trowa