+ Reply to Thread
Results 1 to 4 of 4

Advanced SUMIF - date range including missing dates

  1. #1
    Registered User
    Join Date
    01-14-2014
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    45

    Advanced SUMIF - date range including missing dates

    Hello,

    I need to sum a range of cells by the date in the corresponding column headings - only the dates in the column headings may or may not be continuous.

    So eg. for the week starting 12th Oct, I need to sum where the headings is >= 12Oct and <19Oct, and the start/end date may/may not be available, because the system wouldn't return anything if there hasn't been any sales for all the products on a certain day.

    Dummy cells are welcomed if needed, I can easily blank them out as white text in the final output.

    Attached below is a sample file that illustrates what I need, a formula for the yellow cells. At the moment I have manually sum them up but ideally I want to replace it with a lookup formula that I can copy-and-paste across to the right.

    Advanced sumif.xlsx

    Any help would be greatly appreciated, thank you very much in advance!
    Last edited by chococ; 11-23-2015 at 02:13 PM.

  2. #2
    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,704

    Re: Advanced SUMIF - date range including missing dates

    Try in B9

    =SUMPRODUCT(($B$2:$M$4)*($A$2:$A$4=$A9)*($B$1:$M$1>=B$8)*($B$1:$M$1<=B$8+6))

    Copy across and down

  3. #3
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Advanced SUMIF - date range including missing dates

    Or try that
    =SUMPRODUCT(OFFSET($B$1:$M$1,MATCH($A9,$A$2:$A$4,0),0)*--(B$1:M$1>=B$8)*--(B$1:M$1<B$8+7))

  4. #4
    Registered User
    Join Date
    01-14-2014
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    45

    Re: Advanced SUMIF - date range including missing dates

    Thank you so much!! Didn't know about sumproduct formula before! Works like a charm.

+ 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. Sumif or Index/Match on Multiple Criteria including Dates to Month?
    By patrick1024 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-19-2015, 11:00 PM
  2. [SOLVED] including a date range in SUMIF
    By Emma Blower in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-09-2014, 05:24 PM
  3. Replies: 4
    Last Post: 10-19-2013, 07:50 AM
  4. Excel Macro to find missing dates and insert missing date as blank row
    By JevaMarie in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-26-2013, 11:08 AM
  5. sumif: multiple critera including date
    By his5r2m in forum Excel General
    Replies: 3
    Last Post: 05-20-2009, 11:08 AM
  6. Advanced Filtering Extract Range Missing,etc
    By bridges_22 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-06-2006, 12:19 PM
  7. missing or ill egal extract range advanced filter
    By tjtjjtjt in forum Excel General
    Replies: 3
    Last Post: 07-10-2005, 06:05 PM

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