Automatically format columns with headers of the weekend days

vladimiratanasiu

Active Member
Joined
Dec 17, 2010
Messages
346
Office Version
  1. 2021
  2. 2019
Platform
  1. Windows
Hello!



I have a table with time records for the employees from a firm, as it’s shown in the linked table Time records.xlsx. Giving the different procedure from the weekend time, I need a sollution so that all columns with Sunday and Saturday headers can be automatically formatted, wherever they are placed in the table depending on the calendar.

Thank you!
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
You can do that with conditional formatting using this formula
Excel Formula:
=WEEKDAY(C$4,2)>5
 
Upvote 0
Solution
You can do that with conditional formatting using this formula
Excel Formula:
=WEEKDAY(C$4,2)>5
Thank you for your quick answer. I tried to apply the conditional formula to the whole range of cells (C4:AD13), changing also the headers dates of the April month. Unfortunately, the formatted columns are not linked with the weekend days of April, keeping their initial place (see Time records - April 2021.xlsx). How could I solve this issue? Thank you!
 
Upvote 0
As long as row 4 has valid dates then it will work whatever the month.
 
Upvote 0
As long as row 4 has valid dates then it will work whatever the month.
Thank you, it works very well! The inaccuracy was detemined by the different language settings of my PC. I turned back to the English and the function is available now.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,940
Messages
6,122,356
Members
449,080
Latest member
Armadillos

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