Mirrored Cells

phillyfilms

New Member
Joined
May 8, 2002
Messages
5
Is there a way of having two cells mirror each other. In other words if I enter a value in cell A I want it to also appear in cell B. Likewise, if I enter a value in cell B I want it to appear in cell A.

Thanks.
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
On 2002-05-09 15:48, phillyfilms wrote:
Is there a way of having two cells mirror each other. In other words if I enter a value in cell A I want it to also appear in cell B. Likewise, if I enter a value in cell B I want it to appear in cell A.

Thanks.

I wonder why you would want to do it! ... anyway, this is what I tried -- in column A,

I put the formula
=OFFSET(A:A,0,1)

and in column B, I put the formula
=OFFSET(B:B,0,-1)

The entries do mirror, however as oon as you enter a value in one of the cells, the formula in that cell is gone. So the mirroring is for one time entry only.

I am sure some Excel GURUs will come up with a more viable option.
 
Upvote 0
Here's some code that will do the trick:

Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)

   ' mirror values between colA & colB
   If Target.Column = 1 Then Cells(Target.Row, Target.Column + 1).Value = Target
   If Target.Column = 2 Then Cells(Target.Row, Target.Column - 1).Value = Target

End Sub


OR THIS CODE

Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)

   ' mirror values between colA & colB
   If Target.Column = 1 Then Cells(Target.Row, 2).Value = Target
   If Target.Column = 2 Then Cells(Target.Row, 1).Value = Target

End Sub
This message was edited by Nimrod on 2002-05-09 16:42
This message was edited by Nimrod on 2002-05-09 16:48
 
Upvote 0

Forum statistics

Threads
1,214,391
Messages
6,119,249
Members
448,879
Latest member
oksanana

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
Back
Top