+ Reply to Thread
Results 1 to 5 of 5

countifs value match + date range

  1. #1
    Registered User
    Join Date
    08-08-2007
    MS-Off Ver
    Excel 2010
    Posts
    53

    countifs value match + date range

    trying to workout a countif where...

    If column A:A in Sheet2 is = to A2 Sheet1
    and if column B:B in Sheet2 is = or within 7 days greater than B2 Sheet1

  2. #2
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: countifs value match + date range

    Would something like this work?

    =COUNTIFS(Sheet2!A:A,Sheet1!A2,Sheet2!B:B,">="&Sheet1!B2,Sheet2!B:B,"<="&Sheet1!B2+7)

    - Moo
    Last edited by Moo the Dog; 06-19-2015 at 04:26 PM.

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,908

    Re: countifs value match + date range

    =COUNTIFS(Sheet2!A:A,Sheet1!A2,Sheet2!B:B,"<=" & Sheet1!B2+7)

  4. #4
    Registered User
    Join Date
    08-08-2007
    MS-Off Ver
    Excel 2010
    Posts
    53

    Re: countifs value match + date range

    Both worked. thank you very much!

  5. #5
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: countifs value match + date range

    Glad to help. However, I do not believe JohnTopley's solution will always give correct results, because it is including every result that is <= B2+7, instead of what you originally asked: results that are >=B2 AND <= B2+7.

    JohnTopley's only accounts for the "less than or equal to" B2+7, which will definitely include dates prior to B2.

    Just something to watch out for...

    - Moo

+ 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. countifs for date range
    By superchew in forum Excel General
    Replies: 14
    Last Post: 11-07-2014, 03:31 PM
  2. Replies: 2
    Last Post: 05-28-2014, 06:52 AM
  3. [SOLVED] COUNTIFS With Date Range
    By OlYeller21 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-03-2013, 08:32 AM
  4. Countifs to count rows with a date which match a range of dates
    By pharmerjoe7 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-07-2013, 06:19 AM
  5. Using countifs with date range, and summing values in that range
    By bmcoonan in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-30-2013, 11:28 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