+ Reply to Thread
Results 1 to 6 of 6

Time card calculation formula explanation

  1. #1
    Registered User
    Join Date
    10-22-2013
    Location
    Evanston, Wyoming
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    2

    Time card calculation formula explanation

    Hi,
    I am now responsible for calculating time from employees time cards. We had a time clock that was using hh:mm where the mm was a number between 0-99. That time clock broke and I bought a new one and set it to calculate hh:mm where mm was 0-59.

    About this same time is when I was told to do the time cards. The spreadsheet was setup to use the mm as 0-99. Consequently timecards were miscalculated for about 2.5 months. Average overpaid was 2 hrs each 2wk pay period per employee. (

    So, I found a calculator that uses this calculation for the hh:mm that is for 0-59.

    =IF(AND(B4<>0,C4<>0),IF(C4<B4,C4+1-B4,C4-B4),"")

    I would like to understand this formula. I have used excel a lot and have a basic understanding of formulas. <> is not equal to, "" is empty cell?, I think! Anyways, this formula works for entering time but I want to understand how it works.

    B4 = time IN
    C4 = time OUT

    Thank you for your help!

    Mick

  2. #2
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: Time card calculation formula explanation

    Here's a start:

    IF B4 AND C4 don't equal 0, then IF C4 is LESS THAN B4 (which would mean that the TIME OUT occurs on the following day), then ADD 1 DAY to account that occurance, then subtract B4. Otherwise, subtract the TIME IN from the TIME OUT (since they are on the same day). Finally, the "" is the FALSE result for the first part... if either B4 or C4=0, then the cell wil display nothing.

    Hope this helps!

    - Moo

  3. #3
    Registered User
    Join Date
    03-14-2012
    Location
    KERALA
    MS-Off Ver
    EXCEL 2007
    Posts
    18

    Re: Time card calculation formula explanation

    wat u are going to do

  4. #4
    Registered User
    Join Date
    10-22-2013
    Location
    Evanston, Wyoming
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    2

    Re: Time card calculation formula explanation

    Oh, thank you so much!!!

  5. #5
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: Time card calculation formula explanation

    You're welcome. Glad to help, and thanks for the Rep.

    - Moo

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Time card calculation formula explanation

    Here's another way to write your formula and saves a couple of keystrokes.

    =IF(COUNTIF(B4:C4,">0")<2,"",MOD(C4-B4,1))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 7
    Last Post: 05-18-2009, 02:00 PM
  2. need explanation on simple time calculation
    By Georgina in forum Excel General
    Replies: 1
    Last Post: 04-02-2006, 09:40 AM
  3. Round time maybe this explanation will help
    By Darts in forum Excel General
    Replies: 1
    Last Post: 03-22-2006, 06:00 PM
  4. [SOLVED] Formula for a time card
    By skateblade in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-02-2005, 06:17 PM

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