Conditional formatting over several cells

CJA007

New Member
Joined
May 5, 2016
Messages
3
Hi, I have a large holiday spreadsheet for my staff. The dates are in columns and their names are in the rows. I want to highlight if two or more people from the same work area are on holiday at the same time. Ideally this will flag when their holiday is added and warn them that they may not be able to take that specific time.

Many thanks to everyone.

CJA
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
When you say the dates are in columns, how many columns?
One column with from and to in or are there two columns that contain one date each the first being from the second being to?
Or some other date layout?

You havent said where the work area is, you mentioned dates and name but no work area.
Based on the above you're better off posting an image of what the data looks like, produce a mock up if you feel its sensitive.
 
Upvote 0
NameJan 1Jan 2Jan 3Jan 4Jan 5Jan 6Jan 7Jan 8Jan 9
Adrian1111
Alessia11
Alex111
Alison111
Andrew11
Anthony11
Total620032111

<tbody>
</tbody>














This is a really basic method, but it works. I made the formatting in my spreadsheet with the entire cells filled, rather than just the font coloured, and that looks better and allows me to have the columns with a total of 0 in bright green.

The formatting is simply based on the total: if it's greater than 2 the cell is red, greater than 1 orange, then light green and bright green for 1 person on holiday and none. You can change the values here depending on how many staff you have in each department and how many are allowed to be off at once.

Just select cell B2 and enter the formatting rule as B$9>2 with the format red, then a new rule that goes second in the order as B$9>1, and so on so that they are in the correct order. Then copy and paste the format all across the year and the staff cells and it will appear in the colour depending on how many people have holidays booked then.

Drawbacks to this method: maybe the staff members don't want their holidays to be shown to the entire department in advance (the same guy keeps stopping you from booking the days you wanted but you got in second?); there's no way of showing a public holiday on which the entire workforce might expect to be off.
 
Upvote 0

Forum statistics

Threads
1,215,330
Messages
6,124,305
Members
449,150
Latest member
NyDarR

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top