+ Reply to Thread
Results 1 to 5 of 5

COUNTIFS formula problem - return blank or less than

  1. #1
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In lockdown
    MS-Off Ver
    Excel 2010 (2003 to 2016 but 2010 for choice)
    Posts
    1,766

    COUNTIFS formula problem - return blank or less than

    I have a large COUNTIFS formula to summarise totals from a set of raw data.

    I have run into a problem trying to count date values.

    Part of the formula looks like this
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    It is only counting values in Column O that are less than the value in cell Q38 (so far so good) but at the same time, it is failing to count any cells that have no value in Column O.

    I expected "<" to include empty cells on the basis that their default value should be equivalent to 0!

    How do I alter the formula to include empty cells as well as less than?
    *******************************************************

    HELP WANTED! (Links to Forum threads)
    Trying to create reusable code for Custom Events at Workbook (not Application) level

    *******************************************************

  2. #2
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In lockdown
    MS-Off Ver
    Excel 2010 (2003 to 2016 but 2010 for choice)
    Posts
    1,766

    Re: COUNTIFS formula problem - return blank or less than

    In the end, I repeated the COUNTIFS formula (i.e. = COUNTIFS(formula) + COUNTIFS(formula)) with the 2nd version altered to
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    It works but I was hoping there was a more straightforward / less resource intensive way of achieving this result.

  3. #3
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: COUNTIFS formula problem - return blank or less than

    First, you need to realize that if you reference an entire column, you'll get a count of every blank cell through $O$1048576.
    But if you have other criteria, you might add a second COUNTIFS that tests the same other criteria plus a test if Col_O is blank.....Something like this:
    Please Login or Register  to view this content.
    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  4. #4
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In lockdown
    MS-Off Ver
    Excel 2010 (2003 to 2016 but 2010 for choice)
    Posts
    1,766

    Re: COUNTIFS formula problem - return blank or less than

    Thanks for the suggestion Ron. I'm not affected by the other blank cells as the COUNTIFS formula contains other match pairs.

  5. #5
    Registered User
    Join Date
    08-12-2019
    Location
    Illinois
    MS-Off Ver
    asa
    Posts
    10

    Re: COUNTIFS formula problem - return blank or less than

    It turned out that I understand! thank you for your help.

+ 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] Need help making COUNTIFS formula display as blank if it's 'criteria cell' is blank
    By 27POP27 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-22-2018, 07:38 AM
  2. [SOLVED] COUNTIFS formula keeps counting blank cell with formulas.
    By Big.Moe in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-03-2017, 08:22 PM
  3. when i click the cell where i used Countifs formula it should return the data ?
    By uttam.mothe in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-06-2014, 11:19 AM
  4. Exclude blank cells from COUNTIFS formula
    By Leahsco in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 08-05-2014, 11:45 AM
  5. Problem with cell return in a countifs
    By asterobelix in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-14-2014, 08:09 AM
  6. Countifs should return blank results for blank row of cells
    By Groovicles in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-29-2013, 06:20 PM
  7. formula problem to return blank if
    By excellentexcel in forum Excel General
    Replies: 5
    Last Post: 03-07-2009, 10:03 AM

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