+ Reply to Thread
Results 1 to 2 of 2

vba code

  1. #1
    Registered User
    Join Date
    01-11-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    9

    vba code

    Pls help me, I need code to calculate the OT based on condition in cell $B$2 and cell A3 and cell B3.

    DS & Weekday(Mon~Fri)
    If outtime between 1700 to 1715 then OT = 0
    If outtime between 1900 to 1915 then OT = 2

    NS & Weekday(Mon~Fri)
    If outtime between 400 to 415 then OT = 0
    If outtime between 700 to 715 then OT = 2

    NS & Weekend(sat~sun)
    If outtime between 1700 to 1715 then OT = 8
    If outtime between 1900 to 1915 then OT = 10
    NS & Weekend(sat~sun)
    If outtime between 400 to 415 then OT = 8
    If outtime between 700 to 715 then OT = 10
    Attached Files Attached Files

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: vba code

    Welcome to the Board, however, note:

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title on your post, click EDIT on your First post then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    Your thread title should relate to the underlying problem - ie "Calculating Overtime"

+ 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