+ Reply to Thread
Results 1 to 18 of 18

Count if <=(number) then count displayed Zeros displayed in cell, but ignore BLANK cells

  1. #1
    Registered User
    Join Date
    06-03-2022
    Location
    USA
    MS-Off Ver
    2016
    Posts
    9

    Count if <=(number) then count displayed Zeros displayed in cell, but ignore BLANK cells

    Hi all,

    I need help on this formula...

    =COUNTIF(F3:F12,"<=2")

    it is counting everything less than or equals to 2, but it's also including the BLANK Cells within its range.


    Coincidentally, this formula does the same thing...

    =COUNTIFS(F3:F12,"<=2",F3:F12,"=0")

    what do i need to add/omit/change so that it does not include the blank/null cells?

    any help is greatly appreciated. ^_^
    Last edited by BroDad; 06-03-2022 at 01:27 PM.

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.95 for Mac MS 365
    Posts
    8,682

    Re: Count if <=(number) then count displayed Zeros displayed in cell, but ignore BLANK cel

    not sure why this =COUNTIF(F3:F12,"<=2") is counting blank cells, it doesn't for me.
    maybe post a workbook with it?
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Registered User
    Join Date
    06-03-2022
    Location
    USA
    MS-Off Ver
    2016
    Posts
    9

    Re: Count if <=(number) then count displayed Zeros displayed in cell, but ignore BLANK cel

    Okay. That's really odd. As i was building the workbook to upload here... IT DOES WORK! I will probably have to rebuild the Workbook. Thanks for confirming the formula Sam.

    Quick Question: in Excel OPTIONS > ADVANCED > Display Options for Worksheet ... does a checked "Show a zero in cells that have zero value" affect my question?

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,741

    Re: Count if <=(number) then count displayed Zeros displayed in cell, but ignore BLANK cel

    Are you sure that the "blank" cells are actually empty, rather than containing 0 which is hidden in some way?

    Edit just seen previous post
    does a checked "Show a zero in cells that have zero value" affect my question?
    Yes it does.

  5. #5
    Registered User
    Join Date
    06-03-2022
    Location
    USA
    MS-Off Ver
    2016
    Posts
    9

    Re: Count if <=(number) then count displayed Zeros displayed in cell, but ignore BLANK cel

    The answer is "No" on if the cells are actually empty. The blank cells have a formula in it. It's calculating 2 cells against each other to get a person's age.

    Just now dropping in that formula is counting the "blank (not blank cell)" as 1.

    Is there a way around this?

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,741

    Re: Count if <=(number) then count displayed Zeros displayed in cell, but ignore BLANK cel

    What is the formula in those cells?

  7. #7
    Registered User
    Join Date
    06-03-2022
    Location
    USA
    MS-Off Ver
    2016
    Posts
    9

    Re: Count if <=(number) then count displayed Zeros displayed in cell, but ignore BLANK cel

    =int(yearfrac(e3,am3))

  8. #8
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,741

    Re: Count if <=(number) then count displayed Zeros displayed in cell, but ignore BLANK cel

    That formula will leave 0s, one way round that is to use
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    06-03-2022
    Location
    USA
    MS-Off Ver
    2016
    Posts
    9

    Re: Count if <=(number) then count displayed Zeros displayed in cell, but ignore BLANK cel

    Yes, the Zeros needs to be counted but not Blank Cells.

    Attachment 782789

    Is there a way, that while the formula in calculating the age is present in the cell and the absence of both the DOB and Date, the running formula won't count Blank Cells but once the dates are provided, and if the dates don't amount to 1 year, it will consider a Zero as a count of 1?

    I appreciate all the assistance i have received greatly!

  10. #10
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,741

    Re: Count if <=(number) then count displayed Zeros displayed in cell, but ignore BLANK cel

    Can you provide a sample workbook.

  11. #11
    Registered User
    Join Date
    06-03-2022
    Location
    USA
    MS-Off Ver
    2016
    Posts
    9

    Re: Count if <=(number) then count displayed Zeros displayed in cell, but ignore BLANK cel

    How do i upload a workbook? i thought i saw an attachment button?

    Attachment 782795

  12. #12
    Registered User
    Join Date
    06-03-2022
    Location
    USA
    MS-Off Ver
    2016
    Posts
    9

    Re: Count if <=(number) then count displayed Zeros displayed in cell, but ignore BLANK cel

    Ugh. I have the workbook ready but i get this error...

    "You are not allowed to post any kinds of links, images or videos until you post a few times."


  13. #13
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,741

    Re: Count if <=(number) then count displayed Zeros displayed in cell, but ignore BLANK cel

    To upload a workbook read the yellow banner at the top of the site entitled "HOW TO ATTACH YOUR SAMPLE WORKBOOK:"

  14. #14
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,987

    Re: Count if <=(number) then count displayed Zeros displayed in cell, but ignore BLANK cel

    =sumproduct((f3:f12<=2)*(f3:f12<>""))

  15. #15
    Registered User
    Join Date
    06-03-2022
    Location
    USA
    MS-Off Ver
    2016
    Posts
    9

    Re: Count if <=(number) then count displayed Zeros displayed in cell, but ignore BLANK cel

    Here you go...

    lol. apologies for the images
    Attached Images Attached Images
    Attached Files Attached Files

  16. #16
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,741

    Re: Count if <=(number) then count displayed Zeros displayed in cell, but ignore BLANK cel

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

  17. #17
    Registered User
    Join Date
    06-03-2022
    Location
    USA
    MS-Off Ver
    2016
    Posts
    9

    Red face Re: Count if <=(number) then count displayed Zeros displayed in cell, but ignore BLANK cel

    Quote Originally Posted by Fluff13 View Post
    Thanks for that. How about
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    IT WORKED!

    And it also ignores a blank value!

    Attachment 782804

    Repping where repping is due!

    Thanks Fluff13 for this and Caracalla for chiming in (i did try your solution).

    -Bro Dad

  18. #18
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,741

    Re: Count if <=(number) then count displayed Zeros displayed in cell, but ignore BLANK cel

    Glad to help & thanks for the feedback.

+ 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. Replies: 13
    Last Post: 08-02-2017, 10:40 PM
  2. [SOLVED] Count number of times a specific colour is displayed in the cell
    By vignesh805 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-25-2013, 04:45 AM
  3. [SOLVED] Count number of times a specific number is displayed in a cell ran
    By subs in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  4. [SOLVED] Count number of times a specific number is displayed in a cell ran
    By N Harkawat in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2005, 06:05 AM
  5. Count number of times a specific number is displayed in a cell ran
    By N Harkawat in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2005, 04:05 AM
  6. Count number of times a specific number is displayed in a cell ran
    By subs in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM
  7. Count number of times a specific number is displayed in cells
    By subs in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-27-2005, 11:05 AM

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