+ Reply to Thread
Results 1 to 12 of 12

How do I populate date cell based on the sum of two time cells.

  1. #1
    Registered User
    Join Date
    05-11-2014
    MS-Off Ver
    Excel 2003
    Posts
    5

    How do I populate date cell based on the sum of two time cells.

    Hi all,
    Firstly, thanks to all for your valuable time taken to check out my issue, and help me with my dilemma.
    My apologies if this is listed as another post somewhere, I did do a search and have a look, but couldn't find anything specific to what I need.
    To hopefully assist, I've attached an example workbook.

    Trip Plan example.xlsx

    I'm trying to work out how to have cells R11 - Rxx generate the correct date, based on the rest of the calculations.
    Please note that the attached is a crude cut down version of the larger spreadsheet, for the purpose of highlighting my problem.

    SO, if E7 is changed, subsequently the values in K11:Rxx will be respectively updated.

    D12 and G12 are entered manually. (although I'll probably make these drop downs or date choosers at some point...)

    Depending on the value in E7 and time in D12, the required break period is listed in K11: Kxx.
    The time that these periods of rest are required to occur before is then calculated and listed in O11:Oxx.
    I need R11:Rxx to calculated the appropriate date from these calculations, relative to the date in G12.

    For example, the rest required in K11, is required on the same day, as such it need to populate with the value in G12.
    However the rest required in K13:Kxx, is required by a time (O13:Oxx) on the following day - G12+1
    In some case, this time variance could run over 2 or more days.

    I figure it's got something to do with the value in D12 also including the date of 0/1/1900.

    I'm happy to add hidden cells for formulas/results to work around it, as the end product will print as an A4 document, where many cells will be locked.
    Would prefer not go with any VBA unless it's my only option as I haven't done any VBA stuff as yet.

    Thanks again for your time, Hopefully this all make sense.


    NB (the value in P5 is static only in this example)

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: How do I populate date cell based on the sum of two time cells.

    I've had a go at doing what you want, by changing D12 to include DATE and TIME. No doubt I havn't fully understood your request, but maybe this'll help. There's a helper row that I've added that you may wish to move or hide.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Registered User
    Join Date
    05-11-2014
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: How do I populate date cell based on the sum of two time cells.

    Thanks for your input Glenn,
    Ideally I'd like to use drop down lists/Chooser for the entering of the date and time. Is this possible with the method that you have offered.
    I have tried the Microsoft Date and Time picker but don't really know how to (or if you can) choose a date and a time simultaneously from it.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: How do I populate date cell based on the sum of two time cells.

    You said: Ideally I'd like to use drop down lists/Chooser for the entering of the date and time.

    Which date & time are you referring to? Which cell(s)?

    The formulae in cells R11 - R16 populate automatically from D12, using the time intervals in the helper row.

  5. #5
    Registered User
    Join Date
    05-11-2014
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: How do I populate date cell based on the sum of two time cells.

    The suggestion you've offered works well so long as the date/time is in the same field.

    I'd like to use a drop down list for the time value in D12, and a date chooser for the date in G12.
    Or, is there a date/time picker available that will allow me to select both the date and time for D12 as per your suggestion?

    The workbook (when completed) will be used by a number of people with various computer skills. I need to keep the entry of data as simple as possible.
    I can see manual entry creating headaches for me....

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: How do I populate date cell based on the sum of two time cells.

    OK. I understand now. I have to leave in 10 minutes. I'll see what I can do in that time.

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: How do I populate date cell based on the sum of two time cells.

    It's easy.

    Date B12
    Time C12
    =B12+d12 gives you date:time, which can be hidden.

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: How do I populate date cell based on the sum of two time cells.

    B12 + c12, of course...

  9. #9
    Registered User
    Join Date
    05-11-2014
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: How do I populate date cell based on the sum of two time cells.

    OMG..... It was sooooo simple!!!!! Hahaha

    Thanks a heap Glenn!!

  10. #10
    Registered User
    Join Date
    05-11-2014
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: How do I populate date cell based on the sum of two time cells.

    Ummm OK... so next question is how do I close this thread as Solved and give you credit?

  11. #11
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: How do I populate date cell based on the sum of two time cells.

    that's easy, too.

    -Go to the top of the first post
    -Select Thread Tools
    -Select Mark thread as Solved

    And click on the star labelled "Add reputation" at the bottom of this post.

    Good luck, supatrukka

  12. #12
    Valued Forum Contributor Saarang84's Avatar
    Join Date
    02-19-2009
    Location
    Chennai, India
    MS-Off Ver
    XL 2003 to 2010
    Posts
    812

    Re: How do I populate date cell based on the sum of two time cells.

    Refer my signature below
    If my assistance has helped, there is a reputation icon * on the left hand corner below the post - you can show your appreciation to the user who has helped in resolving your requirement.

    If your requirement has been solved please mark your thread as Solved.
    In the menu bar above the very first post, select Thread Tools, then select "Mark this thread as Solved".

    Kindly use [FORMULA] or [CODE] tags when posting your code.

    Regards,
    Sarang

+ 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] Populate cells based on date and time range selection
    By garyfahy in forum Excel General
    Replies: 3
    Last Post: 03-10-2014, 08:43 AM
  2. populate a cell with a value based upon a specific time (weeks)
    By TMZSourcing in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-18-2013, 01:46 PM
  3. Replies: 1
    Last Post: 07-06-2013, 10:13 AM
  4. Populate cell with current date and time, then lock cell
    By panny in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-17-2012, 06:13 PM
  5. How to populate a value in the cell based on date?
    By smaturu in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-12-2006, 07:53 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