+ Reply to Thread
Results 1 to 11 of 11

Adding date range to SumIf/CountIfs combination

Hybrid View

  1. #1
    Registered User
    Join Date
    12-27-2013
    Location
    Oklahoma
    MS-Off Ver
    Excel 2010
    Posts
    33

    Adding date range to SumIf/CountIfs combination

    Hello,

    Thanks to the Forum, I have a formula that looks for and totals unique numbers in a column that meet a specific criteria in a second column. What I thought would be easy but, isn’t is trying to add another criteria to it. I need to restrict the formula by a date range. What I have that works is:

    =SUM(IF("ABC"=Sheet2!$F$1:$F$1000, 1/(COUNTIFS(Sheet2!$F$1:$F$1000, "ABC",Sheet2!$E$1:$E$1000, Sheet2!$E$1:$E$1000)), 0))

    What I need to add is something like this:
    Sheet2!A:A,">=" & F3,Sheet2!A:A,"<=" & J3)

    The dates are in column A on "Sheet2". The cells where I've placed the date ranges are on the "Master" sheet in cells F3 and J3. I hope that makes sense. I've tried placing the date range everywhere I could think of in the formula but, I've been unable to make it work. Any help would be appreciated since I've searched the forum and the web without luck for something that would point me in the right direction. Thanks to everyone for your assistance.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Adding date range to SumIf/CountIfs combination

    Hi,

    Would you upload the workbook, or at least representative cut down copy so that we may see your request in context.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    12-27-2013
    Location
    Oklahoma
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Adding date range to SumIf/CountIfs combination

    OK. I've uploaded a file I think shows what I'm trying to do. It's work related so I had to create a stripped down version of it. Hope it makes sense. Thanks again for your help.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    12-27-2013
    Location
    Oklahoma
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Adding date range to SumIf/CountIfs combination

    Hello,

    I didn't know if I uploaded the file correctly last night so you would be aware that it was there so, I tried it again. Thank you.
    Attached Files Attached Files

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2502
    Posts
    13,700

    Re: Adding date range to SumIf/CountIfs combination

    You won't be able to enter this array formula in merged cell D12. In D13 array-enter this formula.
    Formula: copy to clipboard
    =SUM(IFERROR((Sheet2!$A$2:$A$661>=Master!$F$3)*(Sheet2!$A$2:$A$661<=Master!$J$3)*(Sheet2!$F$2:$F$661="ABC")*(IF(FREQUENCY(Sheet2!$E$2:$E$661,Sheet2!$E$2:$E$661),1,0)),0))
    If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.
    Dave

  6. #6
    Registered User
    Join Date
    12-27-2013
    Location
    Oklahoma
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Adding date range to SumIf/CountIfs combination

    That works perfectly. Thank you so much. I can see why I wasn't going to be able to add the date range to the existing formula I had. It was making my head hurt. Thank you again.

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2502
    Posts
    13,700

    Re: Adding date range to SumIf/CountIfs combination

    Been there ... done that. Glad it works. Thanks for the feedback and the rep.

+ 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. SUBTOTAL and COUNTIFS combination
    By aaron_burr in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-07-2020, 12:52 AM
  2. Countif formula (I think) in combination with date range
    By adam141 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-24-2015, 03:16 PM
  3. COUNTIFS Between Date Range
    By SalientAnimal in forum Excel General
    Replies: 9
    Last Post: 11-05-2014, 10:39 AM
  4. Replies: 2
    Last Post: 05-28-2014, 06:52 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
  6. Vba: Using Evaluate Sumproduct / Countifs combination for Date
    By vidyuthrajesh in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-29-2012, 07:44 PM
  7. date range and COUNTIFS
    By momus12 in forum Excel General
    Replies: 8
    Last Post: 12-28-2008, 05:38 PM

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