+ Reply to Thread
Results 1 to 4 of 4

Automatically change color of timesheet lines depending on working hours

  1. #1
    Registered User
    Join Date
    02-25-2021
    Location
    montreal
    MS-Off Ver
    ms excel 10
    Posts
    2

    Lightbulb Automatically change color of timesheet lines depending on working hours

    Hello,

    I am doing weekly timesheets for my employees and I am looking for a macro that could help me easily highlight the working hours of my team throughout the day. In the excel doc I linked I tried to show you what I would like to achieve automatically, while I have to do it manually at the moment. I would like the color of the cells in my table to change depending on when people work. For example if my Employee 1 works from 9.30AM to 6PM I would like the line of this employee between that timeframe to be colored in Green.

    It is very complex and I am not sure that it is feasible with the current design of my sheet, I have tried many different formulas through Conditional Formatting but I have 2 values to consider which are the starting and the ending time and I think the only option would be to use a macro but I have no idea how to code it. I am stuck here, maybe it is impossible .

    If anyone have a clue I thank you in advance for your lights!

    Jujuby
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor Eastw00d's Avatar
    Join Date
    02-29-2020
    Location
    Breda, NL
    MS-Off Ver
    2016, 2019
    Posts
    833

    Re: Automatically change color of timesheet lines depending on working hours

    Hi Jujuby,
    welcome to the forum.
    you can easily solve this with formulae, in the area where you put your conditional formatting:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Cheers
    Erwin
    Attached Files Attached Files
    Last edited by Eastw00d; 02-26-2021 at 12:39 AM.
    I started learning VBA because I was lazy ...
    Still developing.... being more lazy...

  3. #3
    Registered User
    Join Date
    02-25-2021
    Location
    montreal
    MS-Off Ver
    ms excel 10
    Posts
    2
    Thank you so much that's exactly what I need
    It is possible to extend the formula to include breaks where the color of the cells will stay blank?

    Th k you again for your help Erwin, really appreciate!

    Quote Originally Posted by Eastw00d View Post
    Hi Jujuby,
    welcome to the forum.
    you can easily solve this with formulae, in the area where you put your conditional formatting:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Cheers
    Erwin

  4. #4
    Valued Forum Contributor Eastw00d's Avatar
    Join Date
    02-29-2020
    Location
    Breda, NL
    MS-Off Ver
    2016, 2019
    Posts
    833

    Re: Automatically change color of timesheet lines depending on working hours

    Yes, but you did not specify when the breaks starts (that could be different at each row, at least that was in my company), I suggest that you add an extra column for that, in between, and then you can apply this one:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    cheers
    Erwin
    Attached Files Attached Files
    Last edited by Eastw00d; 03-02-2021 at 01:12 AM. Reason: typo

+ 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. VBA gradient color change depending on value change reset timer
    By snkhan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-01-2020, 05:47 AM
  2. Replies: 1
    Last Post: 09-18-2018, 04:57 PM
  3. Change tab color depending on cell value
    By rirons04 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-01-2011, 02:34 PM
  4. Replies: 3
    Last Post: 07-08-2010, 06:48 PM
  5. Timesheet for Working hours and Standby Rates
    By euwest30 in forum Excel General
    Replies: 1
    Last Post: 10-18-2006, 11:34 PM
  6. Change color depending on cell value
    By Gary Paris in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-06-2005, 08:08 PM
  7. [SOLVED] How do I get the font color to change automatically depending on
    By gtcarlsbad in forum Excel General
    Replies: 2
    Last Post: 01-31-2005, 11:06 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