Mirrored Cells

Joined
Feb 8, 2002
Messages
3,210
Office Version
  1. 365
Platform
  1. Windows
I am posting this on behalf of a reader....

I need to set up two text cells such that whatever I type into either of them automatically goes into both of them. Any formula I've tried (even using alternate cells as pointers) produces formulas with circular references. How can this be accomplished?

Thanks in advance.
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

Mudface

MrExcel MVP
Joined
Feb 18, 2002
Messages
3,339
Not sure about a formula, but the following worksheet event code will put whatever's typed in cells in column A into the adjacent cell in column B and vice versa, if that's any help: -

Code:
Private Sub Worksheet_Change(ByVal Target As Range)

    Select Case Target.Column
    Case 1
        Cells(Target.Row, 2) = Target.Value
    Case 2
        Cells(Target.Row, 1) = Target.Value
    End Select

End Sub
 
Solution
Joined
Feb 8, 2002
Messages
3,210
Office Version
  1. 365
Platform
  1. Windows
To prevent the event handler being called recursively, you should turn off EnableEvents when you change the cells:

Code:
Private Sub Worksheet_Change(ByVal Target As Range)

    Application.EnableEvents = False

    Select Case Target.Column
    Case 1
        Cells(Target.Row, 2) = Target.Value
    Case 2
        Cells(Target.Row, 1) = Target.Value
    End Select
    Application.EnableEvents = True

End Sub
 

Forum statistics

Threads
1,181,334
Messages
5,929,372
Members
436,665
Latest member
MonkeyNotDonkey

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top