+ Reply to Thread
Results 1 to 8 of 8

Timesheet conditional formatting: changing the colour of a cell base on time worked

  1. #1
    Registered User
    Join Date
    06-21-2016
    Location
    Melbourne
    MS-Off Ver
    2013
    Posts
    4

    Timesheet conditional formatting: changing the colour of a cell base on time worked

    Hi,

    I have some experience with basic conditional formatting but overall I don't know much and would appreciated any help I could get.

    I have timesheets that I need employees to fill out their start and end times. What I want to happen is if their shift is longer or shorter than 8.5 hours I want the cells with their shift time to change colour to Light red but with darker red text.
    I have no trouble creating a total time row under each person which I can use conditional formatting to change colour based on duration of the shift by using =Cell<8.5 and =Cell>8.5 but I'm hoping to find a way to do this without using a total time row.

    I have attached a sample timesheet, what I want to happen is that if the shift duration is more or less than 8.5 hours, cells B3:C4 will change to Light red with darker red font, is this possible?

    Regards,

    Alex
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    12-02-2012
    Location
    Melbourne, VIC
    MS-Off Ver
    Excel 2016
    Posts
    750

    Re: Timesheet conditional formatting: changing the colour of a cell base on time worked

    Hi Alexlambo,
    Welcome to Excelforum.

    Select B3:C4 and then use the following formula for conditional formatting:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Also see attached.
    HTH!
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    06-21-2016
    Location
    Melbourne
    MS-Off Ver
    2013
    Posts
    4

    Re: Timesheet conditional formatting: changing the colour of a cell base on time worked

    Quote Originally Posted by jewelsharma View Post
    Hi Alexlambo,
    Welcome to Excelforum.

    Select B3:C4 and then use the following formula for conditional formatting:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Also see attached.
    HTH!
    Hi Jewelsharma,

    Thank you so much for your help!! I have searched everywhere and could not find this answer so I definitely appreciate it.

    The only problem I am having now is that when I remove and the start and end time the cell stays red, is it possible to add a condition that if there is no start or end time that the cell stays the normal colour?

    Regards,

    Alex

  4. #4
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,908

    Re: Timesheet conditional formatting: changing the colour of a cell base on time worked

    Try ...

    =AND(COUNT($C$3:$C$4)=2,ABS($C$4-$C$3)<>8.5/24)

  5. #5
    Valued Forum Contributor
    Join Date
    12-02-2012
    Location
    Melbourne, VIC
    MS-Off Ver
    Excel 2016
    Posts
    750

    Re: Timesheet conditional formatting: changing the colour of a cell base on time worked

    seems you've already been helped by one of the very best among us. Please mark the thread as [SOLVED]; and do consider adding reputation to Phuocam for his solution.

  6. #6
    Registered User
    Join Date
    06-21-2016
    Location
    Melbourne
    MS-Off Ver
    2013
    Posts
    4

    Re: Timesheet conditional formatting: changing the colour of a cell base on time worked

    You guys are both amazing!! you have both made my life so much easier, thanks so much for the help

  7. #7
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,908

    Re: Timesheet conditional formatting: changing the colour of a cell base on time worked

    You're welcome!

  8. #8
    Registered User
    Join Date
    06-21-2016
    Location
    Melbourne
    MS-Off Ver
    2013
    Posts
    4

    Re: Timesheet conditional formatting: changing the colour of a cell base on time worked

    Hi,

    Sorry to reopen this thread but I have stumbled across my next problem. This conditional formatting mentioned above works really well, the only problem I have now is copying this across 60 people for 7 days a week. Normally clicking and dragging is great but I can't get it to work because of the $ next to each number and letter which I can't remove.

    Do you have any suggestions for the best way to do this which doesn't involve manually entering the conditional formatting into each cell?

    Regards,

    Alex
    Attached Files Attached Files

+ 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: 3
    Last Post: 11-24-2015, 01:57 PM
  2. [SOLVED] Conditional Formatting change cell colour base on value
    By robrobet in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-24-2014, 12:34 AM
  3. Replies: 5
    Last Post: 09-10-2013, 08:32 PM
  4. [SOLVED] Conditional Formatting, Changing Colour of Text
    By MatthewIJClark in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-13-2013, 11:58 AM
  5. Replies: 3
    Last Post: 01-18-2011, 10:31 AM
  6. a cell changing colour base on date comparion
    By mambo84 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-09-2010, 02:59 AM
  7. Conditional Formatting Base on Changing Cell Value
    By starbwoy in forum Excel General
    Replies: 2
    Last Post: 12-17-2009, 12: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