+ Reply to Thread
Results 1 to 9 of 9

How to count non-empty cells?

  1. #1
    Registered User
    Join Date
    05-07-2004
    Posts
    33

    Question How to count non-empty cells?

    I have like 20 columns. I wonder if there is an Excel formula that will count all the non-empty cells across 20 columns. For example, if there are 10 non-empty cells from row B1 to U1 then enter 10 in the result cell A1 and so on down the number of rows. Or, on the other hand, count all the blank or empty cells from B1 to U1.

    Any help is appreciated.
    Last edited by ljCharlie; 03-30-2009 at 11:47 AM.

  2. #2
    Registered User
    Join Date
    03-30-2009
    Location
    Hong Kong
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: How to count non-empty cells?

    Please Login or Register  to view this content.
    Last edited by yING; 03-30-2009 at 09:10 AM.

  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: How to count non-empty cells?

    See also COUNTBLANK
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    05-07-2004
    Posts
    33

    Re: How to count non-empty cells?

    Thanks, what's the difference between count and counta? It does not seem to work. In either case, it does not either give me the number of cells across the columns that are empty or non-empty. Some cells are empty and some are not across the B1:U1 range.

  5. #5
    Registered User
    Join Date
    03-30-2009
    Location
    Hong Kong
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: How to count non-empty cells?

    count() accounts for numbers only.
    While counta() accounts for all possible content.

  6. #6
    Registered User
    Join Date
    05-07-2004
    Posts
    33

    Re: How to count non-empty cells?

    Okay, I tested the COUNTA on a blank sheet and it does seems to count non-empty cells correctly. However, it's not working correctly on my production sheet. I wonder if the formula can be reworked to not count cell that contains spaces or perhaps there is a way in Excel to turn on so all cells that contain spaces will show a space symbol or something.

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: How to count non-empty cells?

    Does Countblank(B1:U1) give you the correct number of blanks in that range?

    If not, then you don't really have blanks.. you may have special characters or some spaces in the cells.

    Try this formula to test a blank cell: =Len(B1) where B1 is a cell that you think is blank... if it does not return a 0, then the cell is not truly blank.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  8. #8
    Registered User
    Join Date
    05-07-2004
    Posts
    33

    Re: How to count non-empty cells?

    Many thanks for all your help. It works now.

  9. #9
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: How to count non-empty cells?

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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