+ Reply to Thread
Results 1 to 5 of 5

Countifs scenario, including "<= Date"

  1. #1
    Valued Forum Contributor Melvinrobb's Avatar
    Join Date
    06-19-2012
    Location
    Manitoba, Canada
    MS-Off Ver
    Excel 2013
    Posts
    1,128

    Countifs scenario, including "<= Date"

    Hi All
    I am attempting a countif function based on the Product, Category and Date.
    In the attached file (assuming it attached, as the regular attachment option was not working, and I had to attempt another way) I have highlighted the only two rows where the function is not working correctly, and have specified what the function should be returning.
    In theory, every A-1 / Category 1 combination should increase the field by 1, resulting every A-1 / Category 1 combination having a unique number.
    I can't figure out why those two are not working correctly.
    Any ideas?
    Thanks.

    EDIT: NOTE: If i go into cell C37 and hit enter, the formula works. Something about that cell has issues for the formula, and since this will be a report someone else will be copying over routinely, I want a more long term solution (rather than manually searching for the errors, and fixing those cells).
    Attached Files Attached Files
    Last edited by Melvinrobb; 07-03-2018 at 10:11 AM. Reason: Added Info
    Please click the * icon below if I have helped.

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Countifs scenario, including "<= Date"

    Try this
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

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

    Re: Countifs scenario, including "<= Date"

    usually when you have to click in a cell and hit enter to get it to work that means your calculations option under the options is set to manual instead of automatic.
    When I open your attachment it is set to automatic but I have two other sheets open and I don't know if it is defaulting to that.
    did you check the settings?
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  4. #4
    Valued Forum Contributor Melvinrobb's Avatar
    Join Date
    06-19-2012
    Location
    Manitoba, Canada
    MS-Off Ver
    Excel 2013
    Posts
    1,128

    Re: Countifs scenario, including "<= Date"

    Sambo - No, it is definitely on Automatic. It seems to be just an excel glitch with the countifs formula.
    AlKey - Yes, that works. I would prefer to use countifs rather than sumproduct, but i guess this works fine.

    If anyone has any idea what the issue with the countifs is (assuming it is not a glitch) I'd love to know.

  5. #5
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: Countifs scenario, including "<= Date"

    Hmm, interesting issue.

    Looks like the culprit is the same row's [Date].

    If you use...
    =COUNTIF(C37,"<="&C37)
    It will return 0. Though when you test =C37<=C37 it returns true.

    I suspect string concatenation is causing issue. But not 100% on that.

    Try using following formula instead.
    =SUMPRODUCT(([Date]<=[@Date])*([Product]="A-1")*([Category]="Category 1"))
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

+ 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: 9
    Last Post: 02-15-2018, 10:10 PM
  2. [SOLVED] Date variations becuase macro not including "DMY" format
    By Ochimus in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-27-2016, 07:36 PM
  3. Replies: 1
    Last Post: 01-22-2016, 09:21 AM
  4. [SOLVED] Emulate Excel 97 getopenfilename "Advanced" find including "Search subfolders"
    By FORTRANguru in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-06-2014, 08:21 PM
  5. Return "green", "yellow" or "red" from date/age and priority ranking
    By Cantaloop in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-04-2013, 12:12 AM
  6. [SOLVED] remove all characters to right of "-" character, including "-"
    By maacmaac in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-27-2012, 02:43 PM
  7. Replies: 10
    Last Post: 01-26-2012, 08:26 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