+ Reply to Thread
Results 1 to 10 of 10

Help with a formula in a timecard

  1. #1
    Forum Contributor
    Join Date
    03-15-2023
    Location
    Seattle, USA
    MS-Off Ver
    Office 365 subscription V2305
    Posts
    138

    Help with a formula in a timecard

    Hello

    I am having problems with a formula in the sample time card I have created for a friend. The problem is when an employee types a "y" in column D (statutory holiday) and he works hours 14, it should pay him time and a half (TAH) for all hours worked that day. If column D is blank then it would pay him 8 reg, 4 tah and 2 DT like it currently does. Any help would be greatly appreciated. See attached
    Last edited by Longbow 44; 06-11-2023 at 01:37 AM.

  2. #2
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Help with a formula in a timecard

    What should be values if D=y.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  3. #3
    Forum Contributor
    Join Date
    03-15-2023
    Location
    Seattle, USA
    MS-Off Ver
    Office 365 subscription V2305
    Posts
    138

    Re: Help with a formula in a timecard

    If D=Y then all hours 14 should be shown in TAH column (I8)

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,820

    Re: Help with a formula in a timecard

    If I correctly understand the question.
    H8: =IF(OR(D8="Y",$C8="Y"),"",IF(AND(ISNUMBER($E8),ISNUMBER($F8)),IF(($F8-$E8)*24>8,8,($F8-$E8)*24),""))
    I8: =IF(D8="Y",G8,IF($G8="","",IF(AND(ISNUMBER($E8),ISNUMBER($F8)),IF($G8>8,IF($G8<=12,$G8-8,MIN($G8-8,4)),0),"")))
    J8: =IF(OR(D8="Y",$G8=""),"",IF(AND(ISNUMBER($E8),ISNUMBER($F8)),IF($G8>12,$G8-12,0),""))
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Help with a formula in a timecard

    In H3

    =IF(OR($G3="",$D3="y"),"",MIN($G3,8))

    In I3

    =IF(OR($G3="",$D3="y"),$G3,MAX(0,MIN(4,$G3-8)))

    In J3

    =IF(OR($G3="",$D3="y"),"",MAX(0,MIN($G3-12,2)))
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    03-15-2023
    Location
    Seattle, USA
    MS-Off Ver
    Office 365 subscription V2305
    Posts
    138

    Re: Help with a formula in a timecard

    Works great thank you JeteMc!

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,218

    Re: Help with a formula in a timecard

    Administrative Note

    ... please don't ignore contributors to your thread - it takes members time to provide suggestions, so acknowledge all solutions offered, even if they don't meet your requirements. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  8. #8
    Forum Contributor
    Join Date
    03-15-2023
    Location
    Seattle, USA
    MS-Off Ver
    Office 365 subscription V2305
    Posts
    138

    Re: Help with a formula in a timecard

    @ kvsrinivasamurthy thank you for your input.
    Last edited by Longbow 44; 06-11-2023 at 10:16 AM.

  9. #9
    Forum Contributor
    Join Date
    03-15-2023
    Location
    Seattle, USA
    MS-Off Ver
    Office 365 subscription V2305
    Posts
    138

    Re: Help with a formula in a timecard

    @ AliGW my bad, it was late last night when I saw the post. I appreciate all members.

  10. #10
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,820

    Re: Help with a formula in a timecard

    You're Welcome. Thank You for marking the thread as 'Solved'. I hope that you have a blessed day.

+ 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: 4
    Last Post: 07-01-2017, 08:35 AM
  2. [SOLVED] Formula for Timecard Auto Calculation
    By blinhart in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-30-2017, 10:02 AM
  3. formula to calculate timecard compliance with multiple variables
    By lovelyanai in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-23-2017, 12:34 AM
  4. [SOLVED] Timecard Formula to determine if they've taken the break they are supposed to
    By pananarama in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 03-10-2015, 06:07 PM
  5. Timecard formula
    By trav12d in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-04-2013, 04:41 PM
  6. Timecard Formula
    By Dihs in forum Excel General
    Replies: 5
    Last Post: 08-05-2010, 01:38 PM
  7. [SOLVED] creating a formula for a timecard obiding by CA OT laws
    By ness in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-26-2005, 05:15 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