+ Reply to Thread
Results 1 to 4 of 4

Count only filled, nonblank cells

  1. #1
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,952

    Count only filled, nonblank cells

    I'm having a problem with coming up with a good way to count nonblank cells. Excel doesn't seem to have that function. The ones I can find are:

    Count, which Counts Numbers
    Counta, which Counts Numbers, Text, and Formulas
    Countblank, which Counts "empty" cells

    The problem is, say I have a range of 5 cells containing a number in one cell, Text in another, a blank in the third, and formulas in the last two that trigger based on the value in A3, either with a text or number response, or "" to mean "nothing". None of the functions above can tell me how many cells actually have values in them at any given time. I need a COUNTA that DOESN'T count formulas.

    I've attached my sample book. The only solution I found that appears to work is this:
    Please Login or Register  to view this content.
    I'm wide open if there's another way to do it. Seems like a simple thing, but not for me.
    Attached Files Attached Files

  2. #2
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: Count only filled, nonblank cells

    Try
    =SUMPRODUCT(--(LEN(A1:A5)>0))
    Last edited by RobertMika; 02-12-2014 at 10:37 AM.
    If you are http://www.excelforum.com/image.php?type=sigpic&userid=125481&dateline=1392355029happy with the results, please add to the contributor's
    reputation by clicking the reputation icon (star icon).




    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.
    To undo, select Thread Tools-> Mark thread as Unsolved.
    http://www.excelaris.co.uk

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Count only filled, nonblank cells

    I've always found it odd that COUNTA considers a formula blank ("") as NOT blank, but COUNTBLANK considers it as blank.

    Try

    =SUMPRODUCT(--(A1:A5<>""))

  4. #4
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,952

    Re: Count only filled, nonblank cells

    Thanks guys. I also found one other Sumproduct variation that appears to work:
    Please Login or Register  to view this content.

+ 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. Count colors and nonblank cells
    By LostInAus in forum Excel General
    Replies: 1
    Last Post: 12-03-2006, 09:21 PM
  2. [SOLVED] Count NonBlank Cells
    By Lynn in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-21-2006, 06:25 PM
  3. [SOLVED] count 2 nonblank cells on multiple worksheets
    By April in forum Excel General
    Replies: 1
    Last Post: 04-18-2006, 04:15 AM
  4. [SOLVED] Count Nonblank Text Cells
    By [email protected] in forum Excel General
    Replies: 13
    Last Post: 03-02-2006, 02:25 PM
  5. [SOLVED] How create a nonblank source for a verification list with a mix of filled & empty cells?
    By Maria J-son in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-08-2005, 03:05 PM

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