Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Counting the number of Worksheets in a Workbook

I want to show how many sheets I have in a workbook using a formula. The
number changes everyday. What do I use, or can I even do this?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 219
Default Counting the number of Worksheets in a Workbook

This user defined function will do it...

Public Function WksCount() As Integer
WksCount = Application.Worksheets.Count
End Function

HTH,
--
Gary Brown

If this post was helpful, please click the ''Yes'' button next to ''Was this
Post Helpfull to you?''.


"Bill from Holland Michigan" wrote:

I want to show how many sheets I have in a workbook using a formula. The
number changes everyday. What do I use, or can I even do this?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,073
Default Counting the number of Worksheets in a Workbook

Gary L Brown wrote:
This user defined function will do it...

Public Function WksCount() As Integer
WksCount = Application.Worksheets.Count
End Function

HTH,
--
Gary Brown


If any of your sheets are not worksheets (eg chart sheets, xl4macro
sheets) then you should use...

Public Function ShtCount() As Integer
ShtCount = Application.Sheets.Count
End Function

Ken Johnson

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
Counting occurance of text values across multiple worksheets Jiq Excel Worksheet Functions 4 May 22nd 06 04:17 PM
HOW DO I FORMAT WORKSHEETS IN A WORKBOOK TO NUMBER IN A SEQUENCE? Lee S Excel Worksheet Functions 1 May 14th 06 05:20 AM
Linking Worksheets in an undefined number of Workbooks ozcarb Excel Discussion (Misc queries) 0 March 22nd 06 10:24 PM
Excel should let its worksheets be arranged (tiled) in a workbook Stephen Flanders Excel Worksheet Functions 1 January 19th 06 07:20 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 02:54 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"