Search for a Sheet

C

Chance224

I have a workbook to track employee's time. There is a sheet for every
employee and then a recap sheet that totals the hours & etc. How can I make
a macro to search for a certin name and then activate that sheet. We have
alot employee's and its a pain to search for the person and enter in the data.

Thanks,
Chance
 
E

Earl Kiosterud

Chance,

You may find a whole bunch of Excel functionality available to you if you
put all the employee data in a single sheet, adding a column for name. That
may not sound appealing, but it may work well for you. Take a look at
www.smokeylake.com/excel. In "Excel truths," read "Data across multiple
tables." Strongly recommended.
 
D

Dave Peterson

Where do you store the name?

Is it in a cell (like A1) of each sheet? Or is it right on the worksheet tab?

If it's on the worksheet tab and you've got to hunt through lots to get to the
one you want, you can right click on the VCR like controls to the left of the
tabs and see a list of all the worksheets in the workbook. (You may have to
click on "more sheets" to see all.)

You could sort the worksheets in alphabetical order to make searching easier:

Chip Pearson's:
http://www.cpearson.com/excel/sortws.htm

David McRitchie's:
http://www.mvps.org/dmcritchie/excel/buildtoc.htm#sortallsheets

You could make a table of contents worksheet where you could just click on a
link to be taken to a specific worksheet.

You can find some code also at David McRitchie's site:
http://www.mvps.org/dmcritchie/excel/buildtoc.htm

Or you could have a floating toolbar that can show you the names of worksheets
to select:
http://groups.google.com/[email protected]

If you're new to macros, you may want to read David's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
 
D

Dave Peterson

And if you're using xl2002 or higher, there's an option under Edit|Find to
search the entire workbook (if those names are in a cell).

If you're using xl2k or below, you can use a nice Find utility from Jan Karel
Pieterse.

It's called FlexFind and you can find it here:
http://www.oaltd.co.uk/MVP/

(In fact, it'll work with any version of excel.)
 
Top