+ Reply to Thread
Results 1 to 6 of 6

Count Visible Cells Within A Selection

  1. #1
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    660

    Count Visible Cells Within A Selection

    Hi all,

    I'm needing help putting a macro together that will count only visible cells within a selection. The first code wil simply count all cells with a numerical value within a selection. However, if I filter a selected column, I'd like to be able to only count
    the visible cells. The 2nd is code, shown is from a Sum Visible Cells Function Code
    which works great in combination with a formula within a cell that contains the
    FunctionName for a set Range IE (=Sum_Visible_Cells(N3:N672)

    If someone can modify the Funtion (if needed) and the Count_Selection code so it
    could possibly work in conjunction with the FunctionCode, I would greatly appreciate it.


    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    I'm sure others will find it very useful for there needs too.


    Thanks,

    BDB
    Last edited by bdb1974; 03-25-2010 at 10:20 AM.

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Count Visible Cells Within A Selection

    This will count visible cells regardless of content. It simply looks to see if the row is hidden or visible.

    Please Login or Register  to view this content.
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Count Visible Cells Within A Selection

    How about just ...
    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    660

    Re: Count Visible Cells Within A Selection

    Thanks Palmetto, this works great.

    SHG, I could not get the function to code to work. I'm assuming I must not be doing something right in setting it up for use.

    Using the function with the formula in any used cell for the result returned a value of 1.

    I've run out of time today. I'll have to play with this some more tomorrow.

    I'm wondering how something like this would work for counting a variable column range
    across a variable row range. Of course it's not setup to count visble cells.

    I've not
    Please Login or Register  to view this content.
    Any thoughts opinions additions, welcome.

    Thanks guys.
    Last edited by bdb1974; 03-24-2010 at 06:19 PM.

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Count Visible Cells Within A Selection

    Quote Originally Posted by bdb1974
    SHG, I could not get the function to code to work. I'm assuming I must not be doing something right in setting it up for use.
    AFAIK you can't use SpecialCells in Functions called from cells.

  6. #6
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    660

    Re: Count Visible Cells Within A Selection

    Thanks Donkey Ote FTI

    Again thanks to all that have contributed in helping me solve this problem.

    BDB

+ Reply to Thread

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