+ Reply to Thread
Results 1 to 4 of 4

Count Visible Workbooks as Part of a Loop

  1. #1
    Registered User
    Join Date
    06-24-2019
    Location
    Buffalo, NY
    MS-Off Ver
    2016
    Posts
    13

    Count Visible Workbooks as Part of a Loop

    Hello,

    Have a question in regards to counting visible worksheets. I need several functions to be performed on several worksheets beginning with the 10th, and continuing onward to the total number of visible workbooks. I have the below line of code, but need it altered to count only visible sheets and perform functions based on that. I tried doing an if statement prior and storing it as a variable but it wouldn't work.


    Please Login or Register  to view this content.

    Thank you!

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Count Visible Workbooks as Part of a Loop

    You are referring to both worksheets and workbooks. Is that a typo and you just mean counting to the total numbet of worksheets in the Active workbook?

    In which case why not just

    If Sheets(i).Visible = True Then
    'blah blah
    End If
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    06-24-2019
    Location
    Buffalo, NY
    MS-Off Ver
    2016
    Posts
    13

    Re: Count Visible Workbooks as Part of a Loop

    Yes that's just a typo, my apologies. And I cant' do that because I need it to count all visible worksheets after i = 10. I just need that count function to only count the visible cells. I know this won't work, but For
    Please Login or Register  to view this content.
    is essentially what I'm looking to do.

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434

    Re: Count Visible Workbooks as Part of a Loop

    try
    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Formula to count number of visible rows, and formula to count visible blanks
    By radoncadonc in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-28-2015, 04:19 PM
  2. [SOLVED] Have a loop macro loop for all visible worksheets
    By Graeme-Black in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-22-2014, 11:01 AM
  3. [SOLVED] Part userform only to be visible after selection
    By Tino XXL in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 12-24-2013, 07:09 AM
  4. Table Object after filtering - Count visible rows & First visible row
    By limalf in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-13-2013, 07:29 PM
  5. [SOLVED] changing a current mod (count unique visible cells ->count unique visible cells criteria
    By liranbo in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-30-2012, 03:58 AM
  6. setting visible (ie displayed) part of the worksheet
    By gvm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-17-2005, 09:10 PM
  7. Replies: 1
    Last Post: 04-27-2005, 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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1