+ Reply to Thread
Results 1 to 16 of 16

Count values excluding formulas

  1. #1
    Registered User
    Join Date
    03-01-2018
    Location
    USA
    MS-Off Ver
    2013
    Posts
    10

    Question Count values excluding formulas

    Hi to all!

    I am trying to find a formula to count only cells that have a value but ignoring if blank, even though all the cells have a formula.

    Ex: Column A has 10 rows with 5 returned values. I want a formula that will give me a count of 5 only. I don't want a sum of those values, just a count of how many values there actually are.

    Any help is appreciated!

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2506 Win 11
    Posts
    24,761

    Re: Count values excluding formulas

    Data Range
    A
    B
    C
    D
    E
    1
    2
    1
    2
    Formula in Col A
    '=IF(B1>0,C1,"")
    2
    2
    1
    2
    copied down
    3
    2
    4
    2
    1
    2
    5
    2
    1
    2
    6
    2
    7
    2
    1
    2
    8
    2
    9
    2
    10
    2
    1
    2
    11
    6
    Formula in A11
    =COUNT(A1:A10)
    12
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Count values excluding formulas

    How about:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    or:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Click *Add Reputation to thank those who helped you. Ask if anything is not clear

  4. #4
    Registered User
    Join Date
    03-01-2018
    Location
    USA
    MS-Off Ver
    2013
    Posts
    10

    Re: Count values excluding formulas

    alansidman =IF(B1>0,C1,"") is not needed as I would only be going down the columns, not across. =COUNT(A1:A10) does not work as it still counts every blank cell due to there being a formula.

    kev_, neither of those work...It just returns a blank cell.

    Thanks for trying!
    Last edited by UGAmom; 03-02-2018 at 02:18 PM.

  5. #5
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Count values excluding formulas

    They work for me - so our assumptions must be different.
    Post a workbook so that we are looking at the same thing
    - click on Go Advanced \ look below and click on ManageAttachments \ follow screen instructions
    Thanks ��

  6. #6
    Forum Contributor
    Join Date
    07-06-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2016
    Posts
    192

    Re: Count values excluding formulas

    normal COUNT should work ?_?
    assuming all the return values are in number

    =count(A1:A10)

  7. #7
    Registered User
    Join Date
    03-01-2018
    Location
    USA
    MS-Off Ver
    2013
    Posts
    10

    Re: Count values excluding formulas

    Maybe I'm not entering in formula right...? Most of my experience with excel has been learned through google.

    See attachment:
    In column AM I need to return value to be 3, not 3/4 and not 5. I'll be putting the formula in cell AM6
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    03-01-2018
    Location
    USA
    MS-Off Ver
    2013
    Posts
    10

    Re: Count values excluding formulas

    finalazy, normal count does not work because all of the cells have a formula so even though the return value in the cell is blank it is being counted and I need it not to be.

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Count values excluding formulas

    All those formulas return 0 (not null strings) if there is no occurrence by type, which is why COUNT() counts them, but you have options set to suppress display of zeros on that worksheet. Use instead ...

    =COUNTIF(AK8:AV8, "<>0")
    Last edited by shg; 03-02-2018 at 03:34 PM.
    Entia non sunt multiplicanda sine necessitate

  10. #10
    Forum Contributor
    Join Date
    07-06-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2016
    Posts
    192

    Re: Count values excluding formulas

    COUNT should work actually even with formulas. Ah i guess shg have answer the reason why it does not work.

  11. #11
    Registered User
    Join Date
    03-01-2018
    Location
    USA
    MS-Off Ver
    2013
    Posts
    10

    Re: Count values excluding formulas

    shg it works perfectly in the attached example, although my actual spreadsheet has many more rows....138. When I plug that formula it it reads way more than it should...not sure why....?

  12. #12
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Count values excluding formulas

    Maybe you should post a better example?

  13. #13
    Registered User
    Join Date
    03-01-2018
    Location
    USA
    MS-Off Ver
    2013
    Posts
    10

    Re: Count values excluding formulas

    Due to privacy issues I can't post the original workbook and it would take way too much time to recreate the amount of info needed. Sorry!

  14. #14
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Count values excluding formulas

    Maybe

    =COUNTIF(AK8:AV8, "<>0") - COUNTIF(AK8:AV8, "")

    If that doesn't work, I don't have another suggestion.

  15. #15
    Registered User
    Join Date
    03-01-2018
    Location
    USA
    MS-Off Ver
    2013
    Posts
    10

    Re: Count values excluding formulas

    shg....brilliant! Worked perfectly....thank you so much!!!!

  16. #16
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Count values excluding formulas

    Y'er welcome.

+ 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] count values excluding holidays
    By Berna11 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-30-2017, 11:04 AM
  2. [SOLVED] Count duplicate text values in columns whilst ignoring/excluding certain values
    By adamwestwell in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-02-2017, 05:34 AM
  3. Replies: 1
    Last Post: 03-03-2014, 11:06 AM
  4. Count needed - numeric values excluding the text value NA
    By Linda Borza in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-18-2013, 07:17 PM
  5. Excluding certain values & prefixes from unique count
    By Bob McCusker in forum Excel General
    Replies: 2
    Last Post: 09-24-2010, 05:31 AM
  6. Excel COUNT function, excluding duplicate values
    By knightcloud in forum Excel General
    Replies: 2
    Last Post: 07-07-2010, 01:58 AM
  7. [SOLVED] How do I use countif to count values excluding blank cells
    By Glenda in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-30-2006, 12:30 PM

Tags for this Thread

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