To trace changes from one sheet to other

shankar

New Member
Joined
Oct 26, 2005
Messages
41
I want to know how can i perform when im typing in one excel sheet it should also appear in the other work sheet with in the same work book.
also how to trace changes from one excel sheet to other excel sheet?
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
If you put this code on the code sheet for Sheet1 of your originating workbook it will copy any changes you make to the Sheet1 worksheet to Sheet2 in the same workbook and to Sheet2 in another specified workbook.

Note that the second workbook has to exist. The actual path to the second workbook should replace "c:\ExcelDocs\mytwin.xls" .

Private Sub Worksheet_Change(ByVal Target As Range)
Dim wb As Workbook, bOpen As Boolean

bOpen = False
Worksheets("Sheet2").Range(Target.Address).Value = Target.Value
For Each wb In Workbooks
If wb.Name = "mytwin.xls" Then
wb.Worksheets("Sheet2").Range(Target.Address).Value = Target.Value
bOpen = True
End If
Next wb
If Not bOpen Then 'open the workbook
Workbooks.Open ("C:\ExcelDocs\mytwin.xls")
Set wb = ActiveWorkbook
wb.Worksheets("Sheet2").Range(Target.Address).Value = Target.Value
ThisWorkbook.Activate
End If

End Sub
 
Upvote 0

Forum statistics

Threads
1,214,954
Messages
6,122,461
Members
449,085
Latest member
ExcelError

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