98.8% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum 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
Resolved · High Priority · Version 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
Training information:
See also:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Make macros work in newer versions of ExcelIf you have created macros in Excel 97 or 2000 that you want to be able to use in 2002/XP or 2003, you may need to alter the macro security settings in the newer version of Excel you are using. |