+ Reply to Thread
Results 1 to 4 of 4

Countif with a conditional argument

  1. #1
    Registered User
    Join Date
    04-02-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    2

    Countif with a conditional argument

    Hi,
    I am using a countif function and I'm running into a problem with using a conditional argument as the criteria.
    I have a spreadsheet in which a column shows due dates for actions and I wish to count how many actions are past their due date based on comparing the values in the column with a date typed into a cell on a different sheet.

    =COUNTIF('In Progress'!K3:K500,"<=Sheet1!B1")

    The formula works if I replace the 'less than' sign with a 'greater than' sign and shows the correct number of cells where dates are greater than the date in B1 but just displays a 0 if I put in the 'less than' sign to try and get it to count cells where the date is less than the date in B1.

    I hope I'm not missing anything simple but it seems illogical that the formula should work for 'greater than' but not for 'less than'

    Any help greatly appreciated!
    Thanks

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,409

    Re: Countif with a conditional argument

    Try this:
    =COUNTIF('In Progress'!K3:K500,"<="&Sheet1!B1)
    Does it work?
    Quang PT

  3. #3
    Registered User
    Join Date
    04-02-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Countif with a conditional argument

    Yes, it does - thank you!

    Why does this work and not the other syntax with the quote marks around the whole argument?

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,409

    Re: Countif with a conditional argument

    Just follow the rule of MS, I have no idea.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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