how do i know if a worksheet exsist

Y

yosi_lb

hi everybody
I have a workbook with about 40 worksheets. each worksheet name has a name
of a student

I need to find out if a spesific student has a worksheet in my workbook

thanks
 
D

David Boothe

hi everybody
I have a workbook with about 40 worksheets. each worksheet name has a name
of a student

I need to find out if a spesific student has a worksheet in my workbook

thanks

Directly from the Excel VBA help file...


This example displays the name of each worksheet in the active workbook.

For Each ws In Worksheets
MsgBox ws.Name
Next ws
 
J

Jim Cone

The free "XL Extras" Excel add-in can create a Table of Contents
worksheet listing all of the sheets in the workbook.
Each name on the table of contents sheet is hyperlinked to the actual sheet.
Download from... http://www.realezsites.com/bus/primitivesoftware
No registration required.
--
Jim Cone
San Francisco, USA


"yosi_lb" <[email protected]>
wrote in message
hi everybody
I have a workbook with about 40 worksheets. each worksheet name has a name
of a student
I need to find out if a spesific student has a worksheet in my workbook
thanks
 
M

Michael Bednarek

I have a workbook with about 40 worksheets. each worksheet name has a name
of a student

I need to find out if a spesific student has a worksheet in my workbook

Based on a suggestion by Harlan Grove, posted here in December 29
(Message-ID: <[email protected]>,
Subject: How to list all sheets):

Assuming the worksheet name whose existence you want to determine is in
A1, put this formula into any cell:

=ISNUMBER(ROWS(INDIRECT("'" & A1 & "'!A1")))

It will return TRUE or FALSE.
 
E

Earl Kiosterud

For a manual lookup, you can get a list of the worksheets by right-clicking
any of the four sheet scroll buttons (lower left).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top