Formatting cells based on certain date function.

%3CLINGO-SUB%20id%3D%22lingo-sub-1883596%22%20slang%3D%22en-US%22%3EFormatting%20cells%20based%20on%20certain%20date%20function.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1883596%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20all%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20pretty%20new%20here%20and%20beginner%20in%20Excel%20too.%20I%20recently%20started%20using%20conditional%20formatting%20and%20am%20still%20learning%20it.%20I%20have%20a%20doubt%20and%20any%20help%20will%20be%20highly%20appreciated.%20I%20am%20trying%20to%20build%20a%20rota%20for%20the%20month%2C%20and%20wanted%20to%20build%20colour%20coded%20days%20to%20indicated%20which%20day%20who%20is%20doing%20what.%20Also%20wanted%20to%20include%20the%20days%20where%20one%20is%20off%2C%20since%20we%20use%20rolling%20day%20off%20per%20week%20for%20everyone%2C%20I%20wanted%20excel%20to%20use%20the%20weekdays%20function%20and%20mark%20rolling%20days%20off%20(eg%3A%20Monday%20this%20week%20to%20Tuesday%20next%20week%20as%20off---the%20trickiest%20art%20in%20this%20is%20the%205th%20week%20where%20one%20will%20be%20off%20on%20Friday%20as%20well%20as%20Monday).%26nbsp%3B%3C%2FP%3E%3CP%3EI%20will%20highly%20appreciate%20if%20anyone%20here%20can%20help%20me%20with%20this.%20Thanking%20you%20in%20advance.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%3C%2FP%3E%3CP%3EBebek%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1883596%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1883906%22%20slang%3D%22de-DE%22%3ESubject%3A%20Formatting%20cells%20based%20on%20certain%20date%20function.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1883906%22%20slang%3D%22de-DE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F867762%22%20target%3D%22_blank%22%3E%40bbkbhattarai%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWith%20your%20permission%2C%3C%2FP%3E%3CP%3Eif%20I%20can%20recommend.%20It%20can%20help%20us%20all%20if%20you%20upload%20an%20Excel%20file%20(without%20sensitive%20data)%2C%20no%20picture.%20Even%20if%20it%20is%20said%20that%20a%20picture%20can%20say%20a%20thousand%20words%2C%20it%20is%20certainly%20not%20in%20the%20case%20of%20Excel%2C%20on%20the%20contrary%20in%20some%20cases.%3C%2FP%3E%3CP%3EYou%20could%20get%20a%20precise%20solution%20much%20faster%20with%20a%20file%20(w%2Fout%20sensitive%20data).%3C%2FP%3E%3CP%3EThis%20would%20also%20be%20a%20blessing%20for%20all%20of%20us%2C%20as%20we%20can%20understand%20the%20problem%20much%20better%2C%20a%20win-win%20situation%20for%20everyone.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E*Knowledge%20of%20Excel%20version%20and%20the%20operating%20system%20is%20a%20must%20have%20if%20you%20want%20to%20proposing%20a%20reasonable%20solution%20(Example%3A%20office%20version%20e.g.%202016%20or%202019%20or%20365%20web%20or%20365%20pro%2C%20etc.%20and%20your%20operating%20system%20(e.g.%20Win10%20(2004)%2C%20Win%2010%20(1903)%2C%20Mac%2C%20etc.).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20your%20understanding%20and%20patience%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENikolino%3C%2FP%3E%3CP%3EI%20know%20I%20don't%20know%20anything%20(Socrates)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1884048%22%20slang%3D%22en-US%22%3ERe%3A%20Formatting%20cells%20based%20on%20certain%20date%20function.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1884048%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F867762%22%20target%3D%22_blank%22%3E%40bbkbhattarai%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIt%20depends%20on%20how%20your%20data%20is%20structured%20and%20what%20do%20you%20consider%20as%20%22this%22%20week%2C%20what%20is%205th%20week%20(from%20month%20start%20or%20every%205th%20after%20long%20days%2C%20off)%2C%20etc.%20Question%20is%20bit%20abstract%20to%20give%20concrete%20answer%2C%20if%20only%20with%20some%20guesses.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1884329%22%20slang%3D%22en-US%22%3ERe%3A%20Formatting%20cells%20based%20on%20certain%20date%20function.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1884329%22%20slang%3D%22en-US%22%3EThank%20you%20for%20your%20reply.%20By%20this%20week%20I%20was%20giving%20a%20reference%20to%20one%20individual%20who%20was%20on%20rolling%20off%20on%20Monday%20this%20week%2C%20so%20she%2Fhe%20will%20be%20off%20Tuesday%20next%20then%20Wednesday%20followed%20by%20Thursday.%20The%20week%20after%20she%2Fhe%20will%20be%20off%20for%20Friday%20and%20Monday%20too%2C%20this%20generally%20is%20the%205th%20week%20on%20the%20rolling%20day%20off%20system.%3CBR%20%2F%3E%3CBR%20%2F%3EWhat%20I%20want%20to%20do%20a%20create%20a%20calender%20with%20dates%20on%20the%20first%20row%20followed%20by%20each%20rows%20for%20the%20day's%20activity%20or%20work.%20There%20will%20be%20different%20rows%20for%20different%20individual%20and%20each%20of%20them%20will%20be%20off%20on%20different%20days%20of%20week.%3CBR%20%2F%3E%3CBR%20%2F%3EI%20wish%20to%20automatically%20mark%20the%20rolling%20off%20days%20with%20certain%20colour%20(say%20black)%20so%20I%20don't%20have%20to%20check%20calendar%20and%20mark%20for%20each%20of%20the%20colleagues%2C%20provided%20I%20can%20use%20some%20sort%20of%20formatting%20to%20achieve%20that%20for%20each%20month.%3CBR%20%2F%3E%3CBR%20%2F%3EI%20hope%20this%20makes%20it%20bit%20clearer.%3CBR%20%2F%3E%3CBR%20%2F%3EMany%20thanks%3CBR%20%2F%3EBebek%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1884436%22%20slang%3D%22en-US%22%3EBetreff%3A%20Formatting%20cells%20based%20on%20certain%20date%20function.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1884436%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F722750%22%20target%3D%22_blank%22%3E%40Nikolino%3C%2FA%3EPlease%20see%20the%20attached%20excel%20sheet.%26nbsp%3B%3C%2FP%3E%3CP%3EAll%20cells%20with%20Black%20colour%20is%20day%20off%20and%20rest%20of%20the%20colour%20coded%20cells%20are%20for%20specific%20tasks.%20I%20wish%20to%20get%20the%20colour%20coding%20for%20the%20rolling%20off%20days%2C%20if%20possible.%20As%20I%20explained%20earlier%20the%20day%20off%20will%20keep%20changing%20from%20week%20to%20week.%20And%20on%20every%205th%20week%20day%20off%20will%20start%20on%20Friday%20for%20that%20week%20followed%20by%20Monday%20of%20the%20next%20week.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWill%20it%20be%20possible%20to%20get%20that%20sorted%20with%20the%20dates%2Fdays%20from%20the%20first%20two%20cells%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20your%20time%20and%20help.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

Hi all,

 

I am pretty new here and beginner in Excel too. I recently started using conditional formatting and am still learning it. I have a doubt and any help will be highly appreciated. I am trying to build a rota for the month, and wanted to build colour coded days to indicated which day who is doing what. Also wanted to include the days where one is off, since we use rolling day off per week for everyone, I wanted excel to use the weekdays function and mark rolling days off (eg: Monday this week to Tuesday next week as off---the trickiest art in this is the 5th week where one will be off on Friday as well as Monday). 

I will highly appreciate if anyone here can help me with this. Thanking you in advance.

 

Regards

Bebek

7 Replies
Highlighted

@bbkbhattarai 

With your permission,

if I can recommend. It can help us all if you upload an Excel file (without sensitive data), no picture. Even if it is said that a picture can say a thousand words, it is certainly not in the case of Excel, on the contrary in some cases.

You could get a precise solution much faster with a file (w/out sensitive data).

This would also be a blessing for all of us, as we can understand the problem much better, a win-win situation for everyone.

 

*Knowledge of Excel version and the operating system is a must have if you want to proposing a reasonable solution (Example: office version e.g. 2016 or 2019 or 365 web or 365 pro, etc) and your operating system (e.g. Win10 (2004), Win 10 (1903), Mac, etc.).

 

Thank you for your understanding and patience

 

 

Nikolino

I know I don't know anything (Socrates)

Highlighted

@bbkbhattarai 

It depends on how your data is structured and what do you consider as "this" week, what is 5th week (from month start or every 5th after long days, off), etc. Question is bit abstract to give concrete answer, if only with some guesses.

Highlighted
Thank you for your reply. By this week I was giving a reference to one individual who was on rolling off on Monday this week, so she/he will be off Tuesday next then Wednesday followed by Thursday. The week after she/he will be off for Friday and Monday too, this generally is the 5th week on the rolling day off system.

What I want to do a create a calender with dates on the first row followed by each rows for the day's activity or work. There will be different rows for different individual and each of them will be off on different days of week.

I wish to automatically mark the rolling off days with certain colour (say black) so I don't have to check calendar and mark for each of the colleagues, provided I can use some sort of formatting to achieve that for each month.

I hope this makes it bit clearer.

Many thanks
Bebek
Highlighted

@NikolinoPlease see the attached excel sheet. 

All cells with Black colour is day off and rest of the colour coded cells are for specific tasks. I wish to get the colour coding for the rolling off days, if possible. As I explained earlier the day off will keep changing from week to week. And on every 5th week day off will start on Friday for that week followed by Monday of the next week.

 

Will it be possible to get that sorted with the dates/days from the first two cells?

 

Thank you for your time and help.

Highlighted

@bbkbhattarai 

You may apply conditional formatting rule with formula

=MOD(WEEKDAY(B3,2)+MOD(B3,7)+MOD(B3,35),10)=5

In attached file it is applied to this range

image.png

Highlighted

@Sergei BaklanThank you for your swift response and the excel sheet with example. It is exactly what I wanted to do with my rota as well, but when I tried it on a new sheet I could not replicate the same using the formula you provided {=MOD(WEEKDAY(B3,2)+MOD(B3,7)+MOD(B3,35),10)=5}. I must have made some mistake, kindly check the attached sheet and guide me through.

 

If possible can you explain how I can change the formula to accommodate different day off, for example Mr A might be off this week on Monday whereas Ms B might be off on Thursday same week.

 

Many thanks

Bebek

Highlighted

@bbkbhattarai 

In formula you shall use first cell of the range for the reference

image.png

If the range starts from first row, use B1. If from third row like C3:C1000, use B3, etc. And I'd fix the column, i.e. $B1, not B1 (and NOT $B$1)