+ Reply to Thread
Results 1 to 4 of 4

Extract a time from a cell with date and time stamp and then perform calculations

  1. #1
    Registered User
    Join Date
    09-13-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    15

    Extract a time from a cell with date and time stamp and then perform calculations

    Hi - I have two cells in a row, each has a date stamp of "01/01/1900". In addition to that date stamp, the first cell has a start time and the other cell has an end time. I am interested in a formula that extracts the time from the two cells and then allows me to perform some simple time of day calculations between the start and end times of the two date stamps

    I have attached a workbook with some sample data and an indication of the formula I would appreciate your help in developing.

    many thanks
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Extract a time from a cell with date and time stamp and then perform calculations

    Hi

    How about
    =IF(AND(C$1>=TIMEVALUE(TEXT($A3,"hh:mm:ss")),C$1<=TIMEVALUE(TEXT($B3,"hh:mm:ss"))),1,0)

    rylo

  3. #3
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: Extract a time from a cell with date and time stamp and then perform calculations

    In C3: =(C$1>=MOD($A3,1))*(C$1<=MOD($B3,1))

    copy across and down as far as needed.

  4. #4
    Registered User
    Join Date
    09-13-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Extract a time from a cell with date and time stamp and then perform calculations

    Thanks to rylo and Teethless mama! Both formulas work for me.

    Much obliged!

+ 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