+ Reply to Thread
Results 1 to 2 of 2

Excel - COUNTIF Problem

  1. #1
    Registered User
    Join Date
    03-06-2009
    Location
    PORTSMOUTH, ENGLAND
    MS-Off Ver
    Excel 2003
    Posts
    5

    Red face Excel - COUNTIF Problem

    "=COUNT(AND(Sheet1!L2:L96<=DATE(2009,3,31)),(Sheet1!O2:O96>=DATE(2009,4,1)))

    I am trying to look at Column L and if the date is earlier than 2009,4,1 and the date in that row in Column O is later than 2009,4,1 THEN count that entry. I have tried all sorts of permutations and the above is a correct formula but it does not return the correct value.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Excel - COUNTIF Problem

    A COUNTIF function can have only one test so revert to either SUMPRODUCT or COUNT Array, SUMPRODUCT generally a little easier to setup and adapt long-term:

    =SUMPRODUCT(--(Sheet1!L2:L96<=DATE(2009,3,31)),--(Sheet1!O2:O96>=DATE(2009,4,1)))

    (those running XL2007 should opt for use of the new COUNTIFS fn which as the name implies caters for multiple tests)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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