+ Reply to Thread
Results 1 to 8 of 8

Formula to count cells that are not empty excluding cells with formulas

  1. #1
    Forum Contributor
    Join Date
    04-30-2010
    Location
    Denmark
    MS-Off Ver
    Office 365
    Posts
    215

    Formula to count cells that are not empty excluding cells with formulas

    Hi everyone

    As title says, im trying to count cells in an area that are not empty, but it should not include cells with formulas resulting in blanks in form of "". So in an area with for instance 5 cells with normal text, 20 empty cells, 2 cells with formulas resulting in "" and 4 cells with formulas resulting in text, the fomula im looking for should say 9.

    Really hope someone got an solution for this and thanks in advance

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Formula to count cells that are not empty excluding cells with formulas

    =count(a1:a100)+countif(a1:a100,"?*")
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Formula to count cells that are not empty excluding cells with formulas

    Try in this way...

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


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  4. #4
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Formula to count cells that are not empty excluding cells with formulas

    So you're just counting non-empty cells.

    =COUNTA(A1:A100)
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  5. #5
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Formula to count cells that are not empty excluding cells with formulas

    Hi.

    Since you mention only text, not numbers:

    =COUNTIF(Range,"?*")

    If in fact there may also be numbers present which you would also wish to be included in the count:

    =SUMPRODUCT(0+(LEN(Range)>0))

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  6. #6
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Formula to count cells that are not empty excluding cells with formulas

    Quote Originally Posted by Special-K View Post
    So you're just counting non-empty cells.

    =COUNTA(A1:A100)
    That counts null strings "", which the OP specifically asked not to be considered.

    Regards

  7. #7
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Formula to count cells that are not empty excluding cells with formulas

    Quote Originally Posted by nflsales View Post
    =count(a1:a100)+countif(a1:a100,"?*")
    Nice. If numbers are also to be considered then, over large ranges, this should be more efficient that the SUMPRODUCT constructions given in this post, despite the fact that two COUNTIF functions are being used.

    Regards

  8. #8
    Forum Contributor
    Join Date
    04-30-2010
    Location
    Denmark
    MS-Off Ver
    Office 365
    Posts
    215

    Re: Formula to count cells that are not empty excluding cells with formulas

    Both solutions works just as intended - thanks to both of you for the very fast replies

+ 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. [SOLVED] Formula to count non-empty cells out of duplicates?
    By Royser12345 in forum Excel General
    Replies: 3
    Last Post: 09-14-2014, 03:09 AM
  2. [SOLVED] Formula to count empty cells when using filter
    By Masun in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-04-2014, 08:34 AM
  3. How to get a MIN formula excluding cells with formulas or zeros
    By astole in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-21-2013, 07:24 AM
  4. function to count numbers excluding empty cells
    By nickelcell1 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-07-2010, 03:10 PM
  5. Average Formula Excluding Empty Cells
    By Alhazred in forum Excel General
    Replies: 5
    Last Post: 03-21-2008, 08:31 AM
  6. [SOLVED] Formula to count cells between dates excluding duplicates
    By Vegs in forum Excel General
    Replies: 11
    Last Post: 07-05-2006, 02:15 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