1. Welcome! Please take a few seconds to create your free account to post threads, make some friends, remove a few ads while surfing and much more. ClutchFans has been bringing fans together to talk Houston Sports since 1996. Join us!

Excel Question

Discussion in 'BBS Hangout' started by Jackfruit, May 23, 2010.

  1. aeroman10

    aeroman10 Member

    Joined:
    Nov 2, 2003
    Messages:
    2,695
    Likes Received:
    50
    I have a new Excel question...going to reuse this thread.
    I have an Excel file with many sheets. The number of sheets changes everytime so its not a set number. Each sheet has a unique name. At times there are sheets that end up completely blank. So I want to create a macro that will find all blank sheets, get their name and then display all these blank sheet names in a new sheet...

    I started by testing with the following code just to see if I can get the names of blank sheets ... which does not work...
    Any advise??

    Code:
    Sub AllSheets()
    Dim ws As Worksheet
    Dim col As Integer
    For Each ws In ActiveWorkbook.Worksheets
      col = Application.WorksheetFunction.CountA(Range("A1:A5000"))
      If col = 0 Then
      MsgBox ws.Name
      End If
    Next ws
    End Sub
    
     
  2. SwoLy-D

    SwoLy-D Member

    Joined:
    Jul 20, 2001
    Messages:
    37,618
    Likes Received:
    1,456
    ISBLANK() ? :confused:

    Check this here forum: http://www.mrexcel.com/forum/showthread.php?t=22474 :eek:
     

Share This Page

  • About ClutchFans

    Since 1996, ClutchFans has been loud and proud covering the Houston Rockets, helping set an industry standard for team fan sites. The forums have been a home for Houston sports fans as well as basketball fanatics around the globe.

  • Support ClutchFans!

    If you find that ClutchFans is a valuable resource for you, please consider becoming a Supporting Member. Supporting Members can upload photos and attachments directly to their posts, customize their user title and more. Gold Supporters see zero ads!


    Upgrade Now