+ Reply to Thread
Results 1 to 8 of 8

Sum by Moving Dates

  1. #1
    Registered User
    Join Date
    05-21-2019
    Location
    SC, USA
    MS-Off Ver
    2013
    Posts
    20

    Sum by Moving Dates

    I need help with a formula for a moving date range.

    If today = Monday then sum the volume for the three dates for the previous Friday-Sunday. Otherwise, sum the volume for yesterday's date.

    Any ideas?

    Thank you.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Sum by Moving Dates

    Can you upload an example spreadsheet showing what you are trying to do?

    Best guess, not knowing exactly what sort of data we're looking at. With Dates in Col A starting at A2, and volumes in Col B
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    05-21-2019
    Location
    SC, USA
    MS-Off Ver
    2013
    Posts
    20

    Re: Sum by Moving Dates

    I will try your suggestion and see how it goes. On a summary tab I want to be able to show what has shipped each previous day, but the caveat is that on Mondays I need to know what shipped Friday, Saturday, and Sunday and the data that feeds the report has 9 rolling days of data in it. But yes, Column A would have the volume and Column B would have the dates.
    Attached Files Attached Files

  4. #4
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Sum by Moving Dates

    Please try

    C1 =Today()

    C2 =SUMIFS(A:A,B:B,">="&WORKDAY(C1,-1),B:B,"<"&C1)
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    05-21-2019
    Location
    SC, USA
    MS-Off Ver
    2013
    Posts
    20

    Re: Sum by Moving Dates

    Works great! I have one more level of complexity to add if you could assist further. There are 7 delivery destinations, or Column "C". How can I incorporate another level of IF criteria, that says if this destination then sum as formula has been written (by previous date if not Monday as you provided). I've tried adding it as a criteria 3 range and criteria 3 but it returns zero which I know is incorrect.
    Attached Files Attached Files

  6. #6
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Sum by Moving Dates

    E1 =TODAY()

    E2 =SUMIFS(A:A,B:B,">="&WORKDAY(E1,-1),B:B,"<"&E1,C:C,C2)
    C2 can be change to "NY" or other destination

  7. #7
    Registered User
    Join Date
    05-21-2019
    Location
    SC, USA
    MS-Off Ver
    2013
    Posts
    20

    Re: Sum by Moving Dates

    Could C2 just be a range of locations? I have a summary sheet with the 7 locations, each having their own column.For Instance C2:I2?

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,556

    Re: Sum by Moving Dates

    It may be helpful if you could provide a sample of the summary sheet.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. Keeping a hold of max gap between dates when dates moving
    By thoma7329 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-14-2019, 05:18 AM
  2. Moving data based on dates
    By BC TIPPING in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-16-2015, 11:30 PM
  3. Replies: 10
    Last Post: 09-04-2013, 08:34 PM
  4. Excel chart with moving dates
    By Richards in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-10-2010, 12:39 PM
  5. [SOLVED] Summing moving ranges & dates
    By Spartacus in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM
  6. [SOLVED] Summing moving ranges & dates
    By Spartacus in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-09-2005, 08:05 PM
  7. [SOLVED] Moving dates between worksheets
    By SuperDad in forum Excel General
    Replies: 3
    Last Post: 02-23-2005, 04:06 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