Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2004
    Location
    Inverurie
    Posts
    628

    Unanswered: Get a count of related worksheets

    Hi all,

    Does anyone know how to get a count of all worksheets that have a common text element i.e. (GT11)?

    This is in order to maintain an accurate count of pages in a specific section of a massive workbook.

    Cheers.

  2. #2
    Join Date
    Jan 2004
    Location
    Aberdeen, Scotland
    Posts
    1,067
    how about this

    Code:
    Sub CountSpecific()
        Dim wks As Worksheet
        Dim i As Integer
        
        i = 0
        For Each wks In ThisWorkbook.Worksheets
            If wks.Name Like "Sheet*" Then
                i = i + 1
            End If
        Next wks
        
        MsgBox i
    End Sub
    for example

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •