+ Reply to Thread
Results 1 to 8 of 8

Late or On Time Calculation

  1. #1
    Registered User
    Join Date
    10-07-2007
    Posts
    88

    Late or On Time Calculation

    I am trying to get the excel formula to look at B2 to see if it is before 6:45 AM. If it is =>6:45 AM i need C2 to say "Late". If B2=<6:44 AM I need it to say "On Time". What should I set B2 format to and what would be the formula for C2? I tried =IF(B2=>6:45,"Late","On Time") but it doesn't work right. Please help.

  2. #2
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191
    Excel views each day as 1, so hours, minutes, and seconds are fractions of 1. Since 6:45 is 27/96 (96 being the number of quarter-hours in the day) through the day, replace 6:45 with 27/96 or, more simply 9/32.

  3. #3
    Registered User
    Join Date
    10-07-2007
    Posts
    88
    thanks for the help. I will try that.

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    You can use the time in the formula but like this

    =IF(B2=>"6:45"+0,"Late","On Time")

  5. #5
    Registered User
    Join Date
    10-07-2007
    Posts
    88
    what formula would i use to show how late, in minutes, a person is? ex: 6:45 AM is 15 mins late.

  6. #6
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191
    =(b2-("6:45"+0))*1440

  7. #7
    Registered User
    Join Date
    10-07-2007
    Posts
    88

    Smile

    thanks that worked great. now if i can figure out a way for excel to color a range of numbers one color and another range of numbers another color, i will be set. thanks for all the help!!

  8. #8
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191
    Look into Conditional Formatting. If you are using 2003 or before, you can only have 3 conditions and they stop being applied once one is true, but Excel 2007 has removed both of these restrictions.

+ 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