I have a workbook with several worksheets like employee details, employee id and employee address. Now i want interlink cells of all that worksheet so changes can be made easily. What is the procedure for linking cells in different worksheets?
I have a workbook with several worksheets like employee details, employee id and employee address. Now i want interlink cells of all that worksheet so changes can be made easily. What is the procedure for linking cells in different worksheets?
Use the formular for linking cells in different worksheets
=sheetname!Cellref
So if your on a employee adderss sheet called Totals, and need a value in employee id sheet 2 called id2 at Cell reference a2, just use
=id2!a2
Right click on the Employee Excel icon (top left next to File) and choose View Code.
Code:Private Sub Workbook_SheetSelectionChange(ByVal emp As Object, ByVal details As Range) If emp.CodeName = "address1" Or emp.CodeName = "id2" Then If details(1, 1).Address = "$A$1" Then Sheets( Array(address.Name, id.Name)).Select Else emp.Select End If End If End Sub
From the employee id worksheets select the cell and Hit the + key navigate to the source data cell,select it and press enter. Now whatever goes in the source cell will end up in the originally selected cell (employee address)too.
Bookmarks