+ Reply to Thread
Results 1 to 9 of 9

Help with a time date forumula

  1. #1
    Registered User
    Join Date
    04-18-2012
    Location
    Romania
    MS-Off Ver
    Professional Plus 2013
    Posts
    14

    Question Help with a time date forumula

    Hey guys I have the following excel
    20130325213807.png

    Now I would like to enter the correct text value for column A exactly as in the example.
    As I said sch1 - lasts from date 01.03.2013 at 7:00 to 01.03.2013 at 14:59, sch2 - lasts from date 01.03.2013 at 15:00 to 01.03.2013 at 22:59 and sch3 - lasts from date 01.03.2013 at 23:00 to 02.03.2013 at 06:59 but I am not sure about how to make it loop by the date since as you can see at sch3 it needs to be part of next day (from date 01.03.2013 at 23:00 to 02.03.2013 at 06:59). I can do it if I have only two days, but not sure how to change the formula when I have more dates (ex. from 01.03.2013 to 04.03.2013)
    I have also included the test excel file if someone wants to give it a try.

    Thank you for the support.

    test.xlsx

  2. #2
    Registered User
    Join Date
    03-24-2013
    Location
    Lahore, Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Help with a time date forumula

    Perhaps using just the time would be a better idea, as irregardless of the date, the 'sch' fields change according to the time. If that is an acceptable solution, I have designed the correct formula. Please see it implemented in the Worksheet.

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


    I hope this is helpful
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    04-18-2012
    Location
    Romania
    MS-Off Ver
    Professional Plus 2013
    Posts
    14

    Re: Help with a time date forumula

    Yeah should be ok but I must note that I have many hours and minutes between for example 07:00 to 14:59
    So I want for all the times between the hours

  4. #4
    Forum Contributor
    Join Date
    09-27-2012
    Location
    London, England
    MS-Off Ver
    2003, 2010
    Posts
    344

    Re: Help with a time date forumula

    Hi - See attached file, columns G, H and I.

    Only cell H2 is hardcoded and all the other dates / times are getting computed based on the pattern i observed in your original data set.

    Hope this helps.

    Thanks.
    Attached Files Attached Files
    If solved kindly remember to mark Thread as solved.
    Click the small star icon at the bottom left of my post if this was useful.

  5. #5
    Registered User
    Join Date
    04-18-2012
    Location
    Romania
    MS-Off Ver
    Professional Plus 2013
    Posts
    14

    Re: Help with a time date forumula

    sorry kbkumar but I don't get your formula
    seems you tried to get the date and time
    I might be wrong but that is what I see from your example

    anyway, the date and time are the only two columns in the file
    I want to just get the sch1, sch2 or sch3 based on that example
    so column A is the one that needs to have a formula (A in my example but you can do on what ever column you want)

  6. #6
    Forum Contributor
    Join Date
    09-27-2012
    Location
    London, England
    MS-Off Ver
    2003, 2010
    Posts
    344

    Re: Help with a time date forumula

    Sorry, i mis-interpreted the OP and went the other way round.

    To get the Sch's populated using the other 2 columns would be a function of nested if's, something on the lines of Daedalus24 suggestion in post #2....

  7. #7
    Registered User
    Join Date
    04-18-2012
    Location
    Romania
    MS-Off Ver
    Professional Plus 2013
    Posts
    14

    Re: Help with a time date forumula

    yeah I know but that is only based on the time
    as I said the issue comes on sch3 since sch3 should start a day before at 23:00 and should end the next day at 6:59
    but it should write sch3 on all the times between those hours

  8. #8
    Registered User
    Join Date
    04-18-2012
    Location
    Romania
    MS-Off Ver
    Professional Plus 2013
    Posts
    14

    Re: Help with a time date forumula

    So any possible suggestions?

  9. #9
    Registered User
    Join Date
    03-24-2013
    Location
    Lahore, Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Help with a time date forumula

    Will times different than the 6 already shown ever need to be entered in the worksheet? If so, just replace the equal to's with boundaries such as >7:00 and <14:59. it should work

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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