+ Reply to Thread
Results 1 to 8 of 8

Rounding dates to specific working days of the week

  1. #1
    Registered User
    Join Date
    07-13-2016
    Location
    Cheshire
    MS-Off Ver
    2010
    Posts
    3

    Exclamation Rounding dates to specific working days of the week

    Hi - I need to round order dates to dates in the future based on a fixed delivery schedule, for example:

    Order 1 Created 13/07/2016 - round to the next Tues
    Order 2 Created 13/07/2016 - round to the next Weds
    Order 3 Created 14/07/2016 - round to the next Mon etc etc

    Can anyone advise a solution for this?

    Many thanks

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Rounding dates to specific working days of the week

    Quote Originally Posted by Sarah C View Post
    Hi - I need to round order dates to dates in the future based on a fixed delivery schedule, for example:

    Order 1 Created 13/07/2016 - round to the next Tues
    Order 2 Created 13/07/2016 - round to the next Weds
    Order 3 Created 14/07/2016 - round to the next Mon etc etc
    etc etc? How are you actually determining which is the next date to 'round' up to?
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

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

    Re: Rounding dates to specific working days of the week

    Quote Originally Posted by Sarah C View Post

    Order 1 Created 13/07/2016 - round to the next Tues
    Order 2 Created 13/07/2016 - round to the next Weds
    Both have the same date yet one gets rounded to Tues while the other gets rounded to Wed.

    What is the logic behind this?

    I predict this is going to be a nightmare!
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    07-13-2016
    Location
    Cheshire
    MS-Off Ver
    2010
    Posts
    3

    Re: Rounding dates to specific working days of the week

    Hey - thanks for the quick response! The delivery dates (so the round up to dates) are all pre-determined at customer level so this will be a fixed field per order.
    We could therefore have different orders (which will be for different customers) that will need to round to different dates.

    So:

    Customer 1 takes delivery Tuesday, order created Monday, round up date to the next Tuesday
    Customer 2 takes delivery Weds, order created Sunday, round up date to the next Weds
    Customer 3 takes delivery Tuesday, order created Thursday, round up date to the next Tuesday

    Hence the etc in the original post, there could be a number of different combinations. I have the weekday numbers for both the order creation date and the customer delivery day but need to calculate the round up date.

    Thanks for all your help!!

  5. #5
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Rounding dates to specific working days of the week

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  6. #6
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Rounding dates to specific working days of the week

    Actually, try this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Where myOrderDate and myDeliveryWeekday are cell references...

  7. #7
    Registered User
    Join Date
    07-13-2016
    Location
    Cheshire
    MS-Off Ver
    2010
    Posts
    3

    Re: Rounding dates to specific working days of the week

    Perfect! Thanks so much for your help, very much appreciated!

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,410

    Re: Rounding dates to specific working days of the week

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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. Dates and days of the week...
    By shhhhh22 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-16-2016, 06:52 PM
  2. Working days of week & month
    By nagesh.tvsr in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-23-2016, 03:35 AM
  3. [SOLVED] Working with specific dates against Week Commencing dates
    By daveb86 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-11-2015, 05:36 AM
  4. Rounding a given date up to a specific day of the week
    By Paul4679 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-30-2012, 07:16 AM
  5. Previous working days date (Mon-Fri working week).
    By intothewild in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-22-2011, 01:00 PM
  6. Working days of week
    By Crispie38 in forum Excel General
    Replies: 2
    Last Post: 04-12-2007, 06:02 PM
  7. Week starts on Saturday - Working days
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-17-2006, 05:39 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