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

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
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,222,312
Messages
6,165,268
Members
451,949
Latest member
bovacik

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