Results 1 to 6 of 6

Counting Only Visible Rows

Threaded View

  1. #1
    Registered User
    Join Date
    11-22-2006
    Posts
    10

    Counting Only Visible Rows

    Hi,

    I am stuck trying to find a solution to the following problem. What is clear is that it should not be written in VBA because I need the result to appear in every cell in column AW.

    To summarise;

    I have two macros that hide or unhide rows. Now I need a way to count only the non-hidden rows. The total needs to be visible in each visible cell of a single column (presently column AW).

    Example - if rows 2 and 3 are hidden using the "Hide Row" macro, the following would happen;

    Row 1 is visible, so it is numbered "1" in AW1.
    Row 2 is not visible, so it either has no number or freezes at "1" in AW2.
    Row 3 is not visible, so it also has no number or freezes at "1" in cell AW3.
    Row 4 is visible, so it is numbered "2" in AW4.
    And so on.

    It doesn't really matter what is in the AW cell in hidden rows because I am not totalling rows. What I am doing is using it to define a print area. If a page has to be 70 rows long, another macro uses column AW to work out where to put page breaks (after row 70, 140, 210 and so on). If twenty rows were hidden on page 1, without the above solution, the printed page would only be 50 rows long. A solution to the above problem will always make sure only visible rows are counted when calculating where to put page breaks.

    I am using Excel 2000.

    I would be very grateful for any help because I'm really stuck on this one.

    Thanks,

    Dom
    Last edited by Dom2012; 11-22-2006 at 01:01 PM.

Thread Information

Users Browsing this Thread

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

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