Forum Discussion

Mac_Craft's avatar
Mac_Craft
Copper Contributor
Dec 29, 2022

Function needed to calculate clock in and out hours

I'm trying to find a function in Excel to auto populate the "clock in time" from a drop down menu 7am to 4pm located in, call it cell "A" and "clock out time" with the same drop down menu of selections 7am to 4pm, in cell "B" to populate total hours worked in cell "C".  Any ideas?  

1 Reply

  • dscheikey's avatar
    dscheikey
    Bronze Contributor

    Mac_Craft 

    Provided the times are correctly defined as clock time (7:00 / 16:00), you can simply:

    =B1-A1

    use. The result is then the fraction of a day. So 1.0 would be 24 hours. 0.25 is 6 hours.

Resources