I have a weekly sales summary where I would like to highlight if the weekending date falls in a week with a public holiday in it.
I can use conditional formatting for a date range or single date but can't find a method of comparing the weekending date with a list of dates to show if a public holiday falls in that week.
The weekending date is always a Sunday but the public holiday dates could be any week day, so a range of Monday-Friday will be necessary i.e. weekend 13/12/2015 would need to look at 07/12/15-11/12/15.
I suspect conditional formatting cannot cope with this and a formula in an adjacent column will be fine. VBA is also fine.
As suggested by #Tim Williams, and assuming you have a list of holiday dates, say in ColumnH starting in H1, you might enter in I1 and copy down to suit:
=WEEKNUM(H1)
then select your other column of dates (assumed to be ColumnA) and HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true::
=WEEKNUM(A1)=VLOOKUP(WEEKNUM(A1),I:I,1,0)
Format..., select your choice of formatting, OK, OK.
Note this only works for one year at a time.
Related
I use a spreadsheet to prioritize workflow for my team. Certain cells highlight depending on how close we are to cycle times. There is a start date, a tentative finish date, and a discharge date.
A blank discharge date cell turns red if:
start date is not blank; tentative is not blank; and today's date is within five days of the tentative date.
Some of my team member have the habit of writing their dates with periods (mm.dd.yyyy). Excel of course does not recognize this as a date. BUT it does know that the 'tentative date' cell is not blank. As a result, even if today's date is equal to the tentative date, the 'discharge date' cell does not turn red. This is taking away from the utility of this sheet, as it is intended to be info at a glance, where a glaring red cell lets one know, "Oh shoot! I need to focus on that task as a priority."
I'd like for the start date and tentative date cells to go red if the date is not the desired format (mm/dd/yyyy).
Formula and condition in S1:
S1 fills red if
=AND($P1-TODAY()<=5,COUNTA($S1)=0,$M1<>0,$P1<>0)
In the same way that you can conditionally format the output as red with your supplied formula above, you can conditionally format the inputs (start date and tentative date) if they do not match your criteria.
One idea is to use something like =SEARCH(".", A1)>0 as the criteria for the format (if the incorrect input always comes in some variation of dd.mm.yyyy, and assuming the start of your range is in cell A1).
Here are the steps to do so if you did not create the original rule:
Highlight the ranges of the start and tentative dates
Go Home->Conditional Formatting->New Rule->"Use formula to determine which cells to format"
Enter the formula above (where you are sure to remove absolute references)
Go Format->Fill->Choose Red and hit okay
I am stuck on a conditional formatting question. So I have a dynamic calendar template in which you can change month and week etc. The dates only range from column E to column X. It looks like this:
The 11th row is the date row, and the orange cells are dates which are holidays. The conditional formatting to color those cells is:
=COUNTIF(holiday,E$11)>0
where holiday is a named range containing the list of holidays.
What I would like to do is color the rows below as well when the date is a holiday. So in this case, if 13th may is a holiday, I12:I17 should also be colored orange.
Any help will be appreciated. Thanks
Edit: As #SRA suggested, if I select the whole E11:X17, it solves my problem halfway as posted:
What I also wanted was to get rid of the text which is coming through conditional formatting, not the text of the date which is the 11th row, but the text of the below rows if its a holiday.
Thanks a lot
You could select the entire range I12:I17 and then apply the conditional formatting
EDIT:
Do the following 2 steps
1) Selec I11 and apply the below formatting
(ONLY BACKGROUND IS ORANGE)
2) Select I12 : I17 and apply the below formatting
(BAKGROUND and FONT both orange)
I have a column with dates of hire, I then also have columns that represent months. Every row is a different employee. I want to highlight cells in the "months" column that are within 6 months of the date of hire. I can't figure out how to make conditional formatting compare the two dates in the two separate cells and then format a third cell based on that date being within 6 months of the DOH. Does that make sense?
Col c = Date of Hire
Col e-p = months (Oct-Sep, they are in date format)
I would like the cells in Col c to be highlighted for staff who have a date of hire that is within 6 months of the date headers in Col c.
Hopefully I have explained clearly enough. Thank you in advance for your help.
Clear any existing CF from ColumnC, select it and HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true::
=AND(C1>EOMONTH(MAX($E$1:$P$1),-19),C1<EOMONTH(MAX($E$1:$P$1),6))
Format..., select formatting, OK, OK.
May require adjustment for the day of the month chosen in cell P1 and for your interpretation of "within" and "six months".
I have an Excel spreadsheet that has sections broken out by month. The headers are individual month names, not dates. Each of these is color-coded to match the month. I have a single cell set aside to display the current month (using the TODAY function). I want to be able to style the cell depending on which month of the year it is.
I set 12 conditional formatting rules to check the cell against. I started out by using ="November" (as an example), but it doesn't seem to equate (TODAY()) with the word "November," so the rule doesn't apply. Either I need a new formula for the cell or there's some formula I have to use in the conditional formatting to get it to recognize the similarity between a date-formatted cell and a text-formatted cell.
Any ideas?
Assuming the cell is in A2, I would just change your conditional formatting formula to something like
=MONTH(A2)=11
TODAY() actually saves the Excel date value (e.g. 42695 for today) but using the MONTH() function will return the month number.
You could also alter the TODAY() formula to be something like
=TEXT(TODAY(),"mmmm")
That will convert the visible date to just show the month name and should still work for your original conditional formatting formula.
I am trying to do conditional formatting on the below example.
I would like to highlight certain columns/cells based on the day of the week. For example, if the date is a Tuesday, then I would like the WeHo, Sunset, WW, MB, Irvine, BrentW, Cienega and Hun B columns highlighted. If possible I would like to base the day of the week off the pre-existing date in cell A2, since we do our work one day before hand (working on a Monday, but cells are highlighted as if the actual date was Tuesday).
Assuming that the date in A2 is a Monday and you want B2:B20, E2:E20, J2:K20, Q2:Q20 and T2:U20 to be formatted then please select those ranges (with Ctrl depressed) and HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true::
=WEEKDAY($A$2)=2
Format..., select your choice of formatting, OK, OK.
Sounds like you want to use formula conditional formatting. Basically, go to the formula conditional formatting and =$A$2="Tuesday" then click ok and make the "apply to" apply to the column you want highlighted when A2 says it's a Tuesday.