+ Reply to Thread
Results 1 to 3 of 3

Time Calcualtion and format problem

  1. #1
    Registered User
    Join Date
    10-06-2010
    Location
    Dunstable,England
    MS-Off Ver
    Excel 2010
    Posts
    95

    Time Calcualtion and format problem

    Hi. I have a spread that calculates the hours an employes has worked based on a Start and Finsh time. The Format of the time is 00:00. The claculation is just Finish time - start time. This works fine unless and employes finsihs on or after 00:00.

    Does anyone know of calculation around this?

    Also the times are netered via a vab user form. The times are selected from combox's that getting the dropdown values from a cell reference on the spread sheet.

    When you selct 00:00 it is displayed as 00:05 and when you type in the time for some but not all times it gets displayed as a decimal.

    Does anyone know to format the combo box so that this doesn't happen?

    code for my combobox reads:

    Please Login or Register  to view this content.
    Many thanks

    Nods

  2. #2
    Registered User
    Join Date
    10-06-2010
    Location
    Dunstable,England
    MS-Off Ver
    Excel 2010
    Posts
    95

    Re: Time Calcualtion and format problem

    I have solved one of the above problems.

    this formula alows you to calculate the difference between 2 times even if they span over midnight

    =IF(M2="Start",0,(N2-M2+IF(M2>N2,1)))


    M= start time
    N = Finish time
    Last edited by nods; 11-10-2010 at 07:57 PM.

  3. #3
    Registered User
    Join Date
    10-06-2010
    Location
    Dunstable,England
    MS-Off Ver
    Excel 2010
    Posts
    95

    Re: Time Calcualtion and format problem

    However, I still have a problem, with my combo box.

    It is formated to [h]:mm or 00:00

    and increases in 15 minute incriments from 00:00 to 23:45. The combobox is getting its source data from a cell reference to a work sheet.

    The problem is when ever I select 12:00 the value is displayed as 00:15.

    does anyone know how to solve this?

+ 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