+ Reply to Thread
Results 1 to 5 of 5

Referring to a COUNTed value

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

    Referring to a COUNTed value

    I'm a complete amateur when it comes to Excel so bear with me if my description isn't brilliant.

    I have a table of results extracted from a database. The number of rows varies each week, say.
    I use a COUNTA function on columnA (which is always populated) in order to find out how many rows the table has.
    Then in subsequent columns, I want to count how many blank values I have. I tried doing this using the COUNTBLANK function, but I want to refer to the result of the COUNTA from columnA to define the range that this COUNTBLANK should consider.

    Any advice gratefully received

  2. #2
    Forum Moderator daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,676
    Try

    =COUNTBLANK(B1:INDEX(B:B,COUNTA(A:A)))

    or

    =COUNTBLANK(OFFSET(B1,,,COUNTA(A:A)))

  3. #3
    Forum Moderator daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,676
    Another way would be

    =COUNTA(A:A)-COUNTA(B:B)

    but that will only count "real" blanks in column B, not so-called "formula blanks", i.e. "" returned by a formula

  4. #4
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    Say your counta formula is in ad2 and you want to count the blanks in col f (starting at f2)use following formula: :
    =COUNTBLANK(INDIRECT("F2"&":"&"f"&AD2))

  5. #5
    Registered User
    Join Date
    11-03-2006
    Posts
    10

    Great - thanks guys!

    Thanks for our suggestions. Worked great. I am a happy bunny again

+ 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