Results 1 to 3 of 3

Thread: How to count Worksheets in Excel file ?

  1. #1
    Join Date
    Feb 2009
    Posts
    34

    How to count Worksheets in Excel file ?

    hello everyone,

    I have created many Worksheets in my Excel and I'm totally unaware how many are actually there. I usually create the new ones and add them to my excel file without deleting the old and unwanted ones. I want to count the actual number os worksheets in my excel files ? Can anybody help me how can I do this ?

    any ideas.....

  2. #2
    Join Date
    May 2008
    Posts
    3,316

    Re: How to count Worksheets in Excel file ?

    To find the count of the number of worksheets, you can use this -

    Code:
    NoSheets =  ActiveWorkbook.Worksheets.Count

  3. #3
    Join Date
    Jan 2008
    Posts
    3,755

    Re: How to count Worksheets in Excel file ?

    Go to the code in "ThisWorkBook". You can find the code by
    >> pressing ALT+F11
    >> Right-clicking on "ThisWorkBook" on the left
    >> Left clicking on view code.

    Then paste in the following

    Private Sub Workbook_Open()
    Sheets("NameOfSheet").Cells(1, 1).Value = Worksheets.Count
    End Sub


    When the worksheet opens, it'll count the number of worksheets and put the
    value in a specified cell. So in this case if you had a sheet named
    NameOfSheet it would put a number in Row 1, Column A.

Similar Threads

  1. Replies: 8
    Last Post: 04-12-2011, 11:24 AM
  2. cannot tab between worksheets in Excel 2007
    By MartinaMiranda in forum Windows Software
    Replies: 5
    Last Post: 06-04-2011, 08:43 PM
  3. Compare two Excel Worksheets on Mac
    By Claudius in forum Windows Software
    Replies: 2
    Last Post: 10-06-2009, 10:46 PM
  4. Merging Excel worksheets
    By Alexxx in forum Tips & Tweaks
    Replies: 3
    Last Post: 03-03-2009, 08:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,718,160,760.88480 seconds with 16 queries