+ Reply to Thread
Results 1 to 6 of 6

SUMIFS between 2 Dates

  1. #1
    Registered User
    Join Date
    07-15-2013
    Location
    MD
    MS-Off Ver
    Excel 2010
    Posts
    2

    SUMIFS between 2 Dates

    Hello,

    I am trying to figure out how to sum data using with date range as one of the variables. Col A has my customer name and across row 1 are my dates. I want to see how much each customer purchased between 2 given dates.

    Here is how my data looks

    customer 6/1/16 6/2/16 6/3/16 6/4/16
    customer1 5 10 10 0
    customer2 50 140 150 10
    customer3 57 140 160 70
    customer4 15 430 340 32

    So say I want to know how much customer 1 spent between 6/1/16 and 6/3/16

    Any thoughts?

    Thanks!

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: SUMIFS between 2 Dates

    the data is in a220 : E224

    g218 = 6-1-2016
    g219 = 6-3-2016

    g221 =SUMPRODUCT(($B$220:$E$220>$G$218)*($B$220:$E$220<$G$219)*($B221:$E221)) and drag down.

    The result is:

    10
    140
    140
    430
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  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
    28,258

    Re: SUMIFS between 2 Dates

    Assuming dates in row 1 and data in row 2

    =SUMIFS($B2:$F2,$B$1:$F$1,">=" &B1,$B$1:$F$1,"<=" &D1)

    B1 is start date, D1 is finish date

  4. #4
    Registered User
    Join Date
    07-15-2013
    Location
    MD
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: SUMIFS between 2 Dates

    Is there a way to add the customer variable in there as well as a cell?

    So
    g218 = 6-1-2016
    g219 = 6-3-2016
    g220 = Customer 1

    I am trying to get this data on a summary page so it would be preferred not to have the summed data right next to the raw data. Does that make sense?

  5. #5
    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
    28,258

    Re: SUMIFS between 2 Dates

    Try

    =SUMPRODUCT(($B$2:$F$5)*($B$1:$F$1>=B$1)*($B$1:$F$1<=D$1)*($A$2:$A$5=$A2))

    Customer names in A2 down

    Data in B2:F5

    Drag formula down

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: SUMIFS between 2 Dates

    Here's another one...

    Data Range
    A
    B
    C
    D
    E
    1
    customer
    6/1/2016
    6/2/2016
    6/3/2016
    6/4/2016
    2
    customer1
    5
    10
    10
    0
    3
    customer2
    50
    140
    150
    10
    4
    customer3
    57
    140
    160
    70
    5
    customer4
    15
    430
    340
    32
    6
    7
    8
    6/1/2016
    6/3/2016
    Customer1
    25


    This formula entered in D8:

    =SUM(INDEX(B2:E5,MATCH(C8,A2:A5,0),MATCH(A8,B1:E1,0)):INDEX(B2:E5,MATCH(C8,A2:A5,0),MATCH(B8,B1:E1,0)))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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. [SOLVED] SUMIFS with two dates
    By Reapz in forum Excel General
    Replies: 8
    Last Post: 04-16-2015, 04:54 PM
  2. [SOLVED] SUMIFS between dates
    By ed2row5 in forum Excel General
    Replies: 4
    Last Post: 02-16-2015, 11:22 AM
  3. [SOLVED] Sumifs using dates help
    By shivernoz in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-25-2014, 12:41 PM
  4. SUMIFS and Dates
    By martinezc5 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-06-2014, 08:34 AM
  5. SumIfs Between two dates
    By adam2308 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-01-2014, 11:31 AM
  6. Sumifs between dates
    By rpiggott in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-11-2013, 03:40 PM
  7. [SOLVED] SUMIFS Between two dates
    By nsens in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-17-2013, 06: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