Results 1 to 5 of 5

Thread: Count until a blank cell is reached?
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    Sep 2009
    Location
    Australia
    Posts
    43
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Count until a blank cell is reached?

    I have a worksheet that contains dates across row 1 starting in Column B. Each day a new column is added. I want to count the number of cells containing dates.

    If I use COUNTA(B1:F1) on one day the next day it should be COUNTA(B1:G1)
    How can I allow for a dynamically changing column limit?

    Cheers
    tigger

  2. #2
    MrExcel MVP
    Join Date
    Apr 2006
    Posts
    19,722
    Post Thanks / Like
    Mentioned
    15 Post(s)
    Tagged
    2 Thread(s)

    Default Re: Count until a blank cell is reached?

    Hi

    You can use:

    =Count(B1:Z1)

    where Z1 is the last column you think will ever have a date.
    Kind regards
    PGC

    To understand recursion, you must understand recursion.

  3. #3
    New Member
    Join Date
    Sep 2009
    Location
    Australia
    Posts
    43
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Count until a blank cell is reached?

    Of course!
    Now I just need to do the maths for a years worth of school days!

    Thanks!

    tigger6333

  4. #4
    MrExcel MVP
    Join Date
    Apr 2006
    Posts
    19,722
    Post Thanks / Like
    Mentioned
    15 Post(s)
    Tagged
    2 Thread(s)

    Default Re: Count until a blank cell is reached?

    Quote Originally Posted by tigger6333 View Post
    Now I just need to do the maths for a years worth of school days!
    You can also use the whole row.

    =Count(1:1)-Count(a1)
    Kind regards
    PGC

    To understand recursion, you must understand recursion.

  5. #5
    New Member
    Join Date
    Sep 2009
    Location
    Australia
    Posts
    43
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Count until a blank cell is reached?

    Now THAT is a super bit of syntax. I thought there may have been a whole row solution but wasn't sure. Thanks very much pgc01.

    tigger

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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