Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

traffic light conditional format

Forum home » Delegate support and help forum » Microsoft Excel Training and help » Traffic light conditional formatting with weekends & bank holida

Traffic light conditional formatting with weekends & bank holida

ResolvedVersion 2016

Lauren has attended:
Excel Intermediate course
Excel Intermediate course

Traffic light conditional formatting with weekends & bank holida

Hi,

I have been asked to amended a set of conditional formatting rules I already have in place, to allow for weekends and bank holidays.
The general idea is, that after I have sent an "MOS" form and entered the date sent into the MOS column (Call this column "A"), this triggers the formulas to start a traffic light clock, please see formulas:-
=AND(E2<>"",OR(E2-D2=3,E2-D2=4))
=AND(E2="",OR(TODAY()-D2=3,TODAY()-D2=4))
=AND(E2="",TODAY()-D2<=2)
=AND(E2<>"",E2-D2<=2)
=AND(E2<>"",E2-D2>=5)
Then after a document was sent back to me, I enter a date in the column next to it (Call it column "B").
So in column C, there would be a figure to show the number of days between the date in A and the date in B.

Is there any way I can edit the formulas above to tweak the clock into NOT counting weekends and bank holidays?

Any help would be greatly appreciated!

Thanks,
Lauren







RE: Traffic light conditional formatting with weekends & bank ho

Hi Lauren,


Thank you for the forum question.

You can use the networkdays function

The Networkdays function return the number of working days between two days, but you will need to create a holiday list for the bank holidays.

I have amended the first rule:

=AND(E2<>"",OR(E2-D2=3,E2-D2=4))

to

=AND(E2<>"",OR(NETWORKDAYS(D2,E2,$N$8:$N$13)=3,NETWORKDAYS(D2,E2,$N$8:$N$13)=4))


In my example I have a bank holiday list in the range N8:N13.

I hope this makes sense and you will be able to amend the rest of the rules.

Kind regards

Jens Bonde
Microsoft Office Specialist Trainer

Tel: 0207 987 3777
STL - https://www.stl-training.co.uk
98%+ recommend us

London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector

Excel tip:

Repeat action

The F4 key will usually repeat your last action. e.g. delete a row, then select another row and press F4 to delete again.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.08 secs.