+ Reply to Thread
Results 1 to 4 of 4

Repair a function Choose, weekday, if formula.

  1. #1
    Registered User
    Join Date
    05-18-2014
    MS-Off Ver
    Excel 2010
    Posts
    7

    Repair a function Choose, weekday, if formula.

    So I found this formula online. It calculates the Overtime hours on Fridays and Saturdays.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    However it does not work properly. When it is friday it only displays 0.42

    So I want to change it so it only displays OT on saturdays. And I want another one that displays OT on sundays(different pay).

    Can somebody help me with this?

    P.S. any suggestions with the G column?
    Attached Files Attached Files
    Last edited by arisigfusson; 05-21-2014 at 06:39 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Repair a function Choose, weekday, if formula.

    You can calc the overall weekend hour with this...
    =IF(WEEKDAY($A2,2)<6,0,C2-B2)
    for weekday hours, use...
    =IF(WEEKDAY($A2,2)>5,0,C2-B2)

    Once you have these hours, you should be able to break out normal and OT hours
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    05-18-2014
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Repair a function Choose, weekday, if formula.

    Quote Originally Posted by FDibbins View Post
    You can calc the overall weekend hour with this...
    =IF(WEEKDAY($A2,2)<6,0,C2-B2)
    for weekday hours, use...
    =IF(WEEKDAY($A2,2)>5,0,C2-B2)

    Once you have these hours, you should be able to break out normal and OT hours
    That worked like a charm. Do you have any tips on calculating the OT before 5 AM?

    Edit:
    Nevermind, I made an if statement that does that.

    =IF(C3>"05:00",SUM("05:00"-C3),0)

    Thanks a million!
    Last edited by arisigfusson; 05-21-2014 at 06:39 PM.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Repair a function Choose, weekday, if formula.

    For before 5:00 am, try this...
    =IF(B2>=5/24,"",5/24-B2)

    After 5Pm, try this...
    =IF(C2>17/24,C2-17/24,"")

+ 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. Choose and Weekday Function
    By juan.doe in forum Excel General
    Replies: 3
    Last Post: 05-12-2014, 08:27 AM
  2. [SOLVED] Formula help to choose lowest cost from multiple vendors and then choose vendor
    By roland_arv in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-27-2013, 07:48 PM
  3. [SOLVED] Using CHOOSE and WEEKDAY to Display Wednesday and Saturday Dates With Time
    By wtierce in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 07-25-2013, 11:34 AM
  4. Replies: 14
    Last Post: 07-24-2013, 06:08 PM
  5. Intentionally overwrite formula then repair
    By Swift4Play in forum Excel General
    Replies: 2
    Last Post: 11-26-2009, 04:54 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