Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
don
 
Posts: n/a
Default synchronize multiple worksheets

I have 7 worksheets in an Excel workbook.
all the worksheets have a lastname, firstname, employee ID in the A,B,C
columns of every worksheet.
I need to synchronize the worksheets so that when I click on an employee
name in any worksheet and select a different worksheet I see the same row as
the original employee name.
I realize this will be a VBA and I have no experience so i hope someone can
explain this in explicit terms.
thank you
don
  #2   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

Don,

Copy the code below, press Alt-F11 to open the VB Editor, press Ctrl-R to
open the project explorer, double click on your workbook to open it, then
double-click on the ThisWorkbook object, then in the window to the right
(usually), click the upper left dropdown, and select "Workbook" Paste the
code into that window, and it should behave as you want.

As written, this will work on names in column A only (Last names). If you
want, it could work on column C instead (employee ID).

If you have trouble getting this to work, post back and I will send you a
working file (leave your email with lots of extra spaces to foil the address
harvesters...)

HTH,
Bernie
MS Excel MVP

Dim myVal As Variant

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Application.EnableEvents = False
Sh.Range("A:A").Find(myVal).Select
Application.EnableEvents = True
End Sub

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, _
ByVal Target As Range)
If Target.Column = 1 Then myVal = Target(1).Value
End Sub


"don" wrote in message
...
I have 7 worksheets in an Excel workbook.
all the worksheets have a lastname, firstname, employee ID in the A,B,C
columns of every worksheet.
I need to synchronize the worksheets so that when I click on an employee
name in any worksheet and select a different worksheet I see the same row
as
the original employee name.
I realize this will be a VBA and I have no experience so i hope someone
can
explain this in explicit terms.
thank you
don



  #3   Report Post  
don
 
Posts: n/a
Default

Bernie, code worked, but i need it to work on the row selection rather than
the name because names may be listed several times in Col A of the
worksheets. And also it ran the first time only, is there a way to turn it on
and leave it on while i'm working on it
"Bernie Deitrick" wrote:

Don,

Copy the code below, press Alt-F11 to open the VB Editor, press Ctrl-R to
open the project explorer, double click on your workbook to open it, then
double-click on the ThisWorkbook object, then in the window to the right
(usually), click the upper left dropdown, and select "Workbook" Paste the
code into that window, and it should behave as you want.

As written, this will work on names in column A only (Last names). If you
want, it could work on column C instead (employee ID).

If you have trouble getting this to work, post back and I will send you a
working file (leave your email with lots of extra spaces to foil the address
harvesters...)

HTH,
Bernie
MS Excel MVP

Dim myVal As Variant

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Application.EnableEvents = False
Sh.Range("A:A").Find(myVal).Select
Application.EnableEvents = True
End Sub

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, _
ByVal Target As Range)
If Target.Column = 1 Then myVal = Target(1).Value
End Sub


"don" wrote in message
...
I have 7 worksheets in an Excel workbook.
all the worksheets have a lastname, firstname, employee ID in the A,B,C
columns of every worksheet.
I need to synchronize the worksheets so that when I click on an employee
name in any worksheet and select a different worksheet I see the same row
as
the original employee name.
I realize this will be a VBA and I have no experience so i hope someone
can
explain this in explicit terms.
thank you
don




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the quickest method to insert & name multiple worksheets . clyonesse Excel Worksheet Functions 8 September 20th 05 10:55 PM
HOW DO i SYNCHRONIZE MULTIPLE WORKSHEETS IN EXCEL? saranat New Users to Excel 7 May 2nd 05 07:19 PM
how do I arrange multiple worksheets from the same workbook skytags Excel Discussion (Misc queries) 2 April 28th 05 06:46 PM
Extracting data from multiple worksheets into a list mnirula Excel Worksheet Functions 16 February 25th 05 09:52 PM
Countif with multiple criteria and multiple worksheets JJ Excel Worksheet Functions 1 December 28th 04 07:37 PM


All times are GMT +1. The time now is 02:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"