+ Reply to Thread
Results 1 to 5 of 5

Time calculation formula in excel and conditional format

  1. #1
    Registered User
    Join Date
    05-28-2012
    Location
    Dhaka
    MS-Off Ver
    Excel 2003
    Posts
    34

    Time calculation formula in excel and conditional format

    Dear All,

    As I yet to get solution on my trial to calculate the overtime, I am bothering you again. There are several conditions for calculation, only before 8:30 and 17:00 hours over time is counted for. Further on Friday, Saturday and on other national holidays there will be no over hover hours but are paid on a fixed rate. To make the Fridays and Saturdays I also put in column “G” conditional format to mark the cell dark, it works somehow but when ever I type some thing in any cell of column “G” it also takes the dark colour. One more problem if I delete the date in Column “A” then the corresponding cell of column “G” becomes dark also. Moreover I see the error in calculating time.
    Say $G$5= 8:30, $I$5=17:00
    B8= 8:30 and C8=18:00, then overtime should be 1.00 hour but the formula =IF(OR(WEEKDAY(A8)=6,WEEKDAY(A8)=7),0,IF(OR(ISBLANK(B8),ISBLANK(C8)),"",INT(IF(OR(B8>G$5,C8<I$5),0,($G$5-B8+($G$5<B8))+(C8-$I$5+(C8<$I$5)))*24))) gives 0.00
    I upload the find for your necessary corrections.

    Kindest regards,

    Subhash
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor Sadath31's Avatar
    Join Date
    03-02-2011
    Location
    Dammam, Saudi Arabia
    MS-Off Ver
    Office 365
    Posts
    452

    Re: Time calculation formula in excel and conditional format

    use this

    HTML Code: 

  3. #3
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Time calculation formula in excel and conditional format

    I made some formulas that I hope is right. I'm not so sure exactly how you want to calculate the overtime though.
    Some conditional formatting in columns A and G.
    Attached Files Attached Files
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

  4. #4
    Registered User
    Join Date
    05-28-2012
    Location
    Dhaka
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Time calculation formula in excel and conditional format

    Dear Friend,
    Thanks a lot. It works as I want.

    Kind regards,


    Subhash

  5. #5
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Time calculation formula in excel and conditional format

    @ Subhash Sarker

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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