#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Count sheets

Hi, is there a way I could display how many sheets I have in a workbook

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 896
Default Count sheets

use this code/function:

Function sheet_count() As Integer
sheet_count = ThisWorkbook.Sheets.Count
End Function

press ALT+F11 to open Microsoft Visual Basic window
click Insert-Module
paste the code there

then in any cell insert:
=sheet_count()

ATTENTION: the function ALL sheets in the workbook, including chart
sheets and hidden sheets

pls click YES if this post was helpful


On 10 Kwi, 11:48, "Dale" wrote:
Hi, is there a way I could display how many sheets I have in a workbook

Thanks


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Count sheets

Try this udf:

Function sheetcount() As Long
sheetcount = Sheets.Count
End Function

--
Gary''s Student - gsnu200845


"Dale" wrote:

Hi, is there a way I could display how many sheets I have in a workbook

Thanks

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
Count number of sheets tc Excel Worksheet Functions 5 September 10th 07 05:22 PM
How do I use workbook.sheets.count dradon Excel Discussion (Misc queries) 2 October 19th 06 10:33 PM
Count the number of sheets. Olle Svensson Excel Discussion (Misc queries) 3 March 13th 06 02:30 PM
COUNT over several sheets...Part 2! Fybo Excel Discussion (Misc queries) 2 March 8th 05 05:27 PM
COUNT over several sheets Fybo Excel Discussion (Misc queries) 6 March 8th 05 04:40 PM


All times are GMT +1. The time now is 12:47 PM.

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

About Us

"It's about Microsoft Excel"