Results 1 to 5 of 5

Thread: How To Change Date Based On Time Using Formula

  1. #1
    Member
    Join Date
    Aug 2011
    Posts
    92
    Rep Power
    14

    How To Change Date Based On Time Using Formula

    Hi,

    Looking for a formula to change date automatically based on time in previous column.
    example:

    I have week start date in Cell B1 and Time Starts from Cell C3,C4.. i.e. 12:00 PM, 13:00PM ......23:00, 00:00. I want to change the date in column D starting cell D3which will changes at 00:00 hrs. the input for first date will be B1. I am unable to upload the sample file, Below is the sample output

    Time Date
    20:00 5-Aug
    21:00 5-Aug
    22:00 5-Aug
    23:00 5-Aug
    0:00 6-Aug
    1:00 6-Aug


    Thanks
    Rajesh
    Last edited by Rajesh Kr Joshi; 08-03-2013 at 01:56 PM.

  2. #2
    Administrator Admin's Avatar
    Join Date
    Mar 2011
    Posts
    1,123
    Rep Power
    10
    Hi

    If I understood correctly, in D3

    =B1

    In D4 and copied down,

    =INT(D3)+C4
    Cheers !

    Excel Range to BBCode Table
    Use Social Networking Tools If You Like the Answers !

    Message to Cross Posters

    @ Home - Office 2010/2013/2016 on Win 10 (64 bit); @ Work - Office 2016 on Win 10 (64 bit)

  3. #3
    Senior Member alansidman's Avatar
    Join Date
    Apr 2012
    Posts
    125
    Rep Power
    13
    See attached
    Attached Files Attached Files

  4. #4
    Member
    Join Date
    Aug 2011
    Posts
    92
    Rep Power
    14
    Hi Experts,

    Thanks for the quick solution. Working perfect

    Thanks
    Rajesh

  5. #5
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,402
    Rep Power
    10
    in addition to alansidman's solution, even if it is an hourly change and it's a 'half past' hour, for example, 11:30 PM, 00:30PM, 1:30PM, where there's no zero hours (sharp midnight), then this formula will work

    =IF(C4<C3,D3+1,D3)
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

Similar Threads

  1. Freeze Time Using Excel Formula To Freeze Date
    By Excel Fox in forum Excel and VBA Tips and Tricks
    Replies: 1
    Last Post: 06-28-2013, 08:11 PM
  2. Replies: 5
    Last Post: 06-15-2013, 12:40 PM
  3. Change Display Range Based On Change of Dropdown Values
    By rich_cirillo in forum Excel Help
    Replies: 2
    Last Post: 03-29-2013, 04:58 AM
  4. How To Change Date Format in Excel
    By Oh!Calcutta in forum Excel Help
    Replies: 1
    Last Post: 11-01-2012, 09:36 PM
  5. Displayin Date/Time in "original" time zone
    By Rasm in forum Excel Help
    Replies: 4
    Last Post: 04-21-2012, 02:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •