I was looking for a way to change the color or a cell based on the date of the week reflected on that cell or another cell. In my case I was trying to make 2 different colors for Monday and Thursday.
I found a discussion here that gave me hints into what I found is the best answer. See below.
Use the function weekday(cell)=? (1 for Sunday, 2 for Monday, .....7 for Saturday). Detailed description is below (thanks to the answer by Emerson Peters on link above):
===================================
Say the column of dates is A. Select it, Format > Conditional formatting..., Custom formula is and enter:
=weekday(A1)=1
Choose the formatting required.
The final 1
above is for Sunday, other days follow in numeric order.
Repeat for the other required formats, adjusting the 1
as necessary for other days of the week.
Because these rules do not conflict (each date is only one specific day of the week) the order in which the rules are added (with "+ Add another rule") does not matter.
===================================
I have used this process and created Conditional Format rules to make Mondays Green and Thursdays Pink. As below see results and conditional format formulas:
Results:
Conditional format rules:
I hope this helps you and it did to me.
No comments:
Post a Comment