# Copy fill color of Adjacent Cell

1. ## Copy fill color of Adjacent Cell

Hello all, first post
I have looked in the forum for an answer to this question, and I believe it should be simple but can't find anything that quite fits my problem.
I am setting up a schedule maker for a coworker, in which I have divided two columns into time in and time out for each day of the week. My coworker wants the cell to be highlighted red if the shift is a night shift (Begins after 4), and I used conditional formatting to set up both columns independently to evaluate if the value of their content is after 4 PM. However, this means if a shift starts at noon, but ends after 4, only the time out cell will be highlighted red, not a huge issue but it isn't aesthetically pleasing. Any help is appreciated,
Thanks

2. ## Re: Copy fill color of Adjacent Cell

So, in the case of a 12-noon start, does that mean that you do not want the end time to show red? If so, you should amend the CF condition which acts upon the time out column, so that it uses the time in value. This is easier to do using a formula like:

=A2>TIME(16,0,0)

while the cell B2 is selected, assuming your times are in columns A and B.

Hope this helps.

Pete

3. ## Re: Copy fill color of Adjacent Cell

I think I understand what you are saying, would that be a conditional format I could paint onto other cells and have them use their adjacent time "in" cell? It would be quite tedious to have to set each ones conditional formatting individually, as there are dozens of employees each with seven cells for the day of the week.
Thanks

4. ## Re: Copy fill color of Adjacent Cell

Conditional Formatting works well over a range of cells so you don't have to have one rule per cell. For your example, select the column for the IN time and create the rule...all cells that match the rule will be formatted accordingly. Do the same for the OUT column.

You are not "painting" the format. the format is calculated according to the criteria set in the Conditional Formatting.

##### Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### 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