Highlighting columns based on day of week - excel

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.

Related

How to conditional format in excel based on date ranges

I am trying to format an excel document using conditional formatting
if cell is less than 1035 days from todays date make green
if cell is between 1036 days and 1095 days date make orange
if cell is more than 1095 from todays date make red
What formulas would I need?
Thanks
Say your dates start in B1 and go to B100.
Select B1, then select conditional formatting - New Rule - Use a formula to determine which cells to format.
For the highlight green example formula, use:
=DATEDIF($B1,NOW(),"d")<1035
Hit the format... button and fill to corresponding color.
Hit "OK"
Then in the manage rules menu, in the Applies To column, enter the range of cells you want that to apply to. i.e. =$B$1:$B$100
For the highlight orange example formula, use:
=AND(DATEDIF($B1,NOW(),"d")>1035,DATEDIF($B1,NOW(),"d")<1095)
For highlight red example formula, use:
=DATEDIF($B1,NOW(),"d")>1095

change excel cell color if date in cell mentioned is less than 20 days from date today

i'm newbie in excel and i have an excel sheet where i need to change the cell color if the date mentioned in the cell is becomes 15 days old and also add a status in next column as pending.Please help with this.
Assuming your dates are in ColumnA, please select that column and HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true::
=TODAY()-A1>=15
Format..., select your choice of colour for formatting, OK, OK.
If the "pending" labels re then to be added in ColumnB where appropriate please put in B1 and copy down to suit:
=IF(TODAY()-A5>=15,"pending","")
You could use the pending in ColumnB to trigger the colour for ColumnA but it may be better to keep the two requirements separate. If you were to trigger via 'pending' you would still need a formula rule, rather than a "cell content" one.
Change 15 to 20 when you have decided what the interval should be. Beware that if your ColumnA values include times (even if not displayed) you cannot reliably simplify >=15 to >14.
This is the formula you might be looking for:
=IF(DAYS(TODAY(),A1)>=15,"pending",other_status_you_use)
Then you should go to
Conditional Formatting > Highlight Cell Rules > Text that Contains...
There you can type pending and change the color as you wish.

Highlight cell if it falls in a list of dates

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.

Highlight a cell if a corresponding cell (in another sheet) has a value in it

I am trying to compare pages of employee hours verses sales. In order to catch myself if I record sales and not hours, I'd like the hours cell for a given date to highlight itself, if the sales cell has a value.
Here's an example of the "hours" sheet:
2-Nov 3-Nov 4-Nov
Smith Judy 0.8 7.25 0
And an example of the "totals" sheet:
2-Nov 3-Nov 4-Nov
Smith Judy $15.72 $76.55 $82.13
The problem would be that Judy is listed as selling $82.13 (E2) in product, while having worked 0 hours (E2) according to the "hours" sheet.
Is there a conditional formatting formula that I can use to get Excel to highlight the "0" listed under 4-Nov on "Hours"?
Is there a conditional formatting formula that I can use to get Excel to highlight the "0" listed under 4-Nov on "Hours"?
Yes. If you want to highlight the "0" on the "Hours" sheet, you can use conditional formatting where the formula includes a reference to a cell on a different sheet.
For example, click on the Hours sheet cell E2. Go to Conditional Formatting -> New Rule -> Use a Formula to Determine Which Cells to Format and paste a formula in the "Format values where this formula is true:" box there, like:
And(E2>0,totals!E2 =0)
Then click the Format button below it on the right, activate the Fill tab, and click what color you want the cell to be highlighted in.
Thanks to Scott Craner's comment on the question for providing an improved formula.
Rather than just formatting a singe cell, I suggest selecting all the relevant columns in hours (presumably starting with C) 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(OR(C1="",C1=0),NOT(ISBLANK(totals!C1)),NOT(ISBLANK($B2)))
Format..., select your choice of highlighting OK, OK.
This warns even when blank rather than 0 in hours but relies on names such as Judy to avoid extending to empty rows. It also allows for values in totals of nil or negative (in case of adjustments).

Conditional format formula using =today() and greater than / less than

Trying to set up a bit of a to do list with conditional formatting dates. Any time I open the file B2 will load =today()'s date. What I'm hoping to do is find a formula that will allow something like if C2 < B2 (Over due) then conditional formatting rule, or if C2 is 7 days more than B2 then format rule 2.
Not sure how to proceed with this as =today() isn't being treated like numeric data.
Any suggestions?
Thanks!
To apply to C2, 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::
=C2<B2
Format..., select choice of formatting, OK, OK.
Then repeat with:
=C2=B2+7
and (presumably) a different choice of formatting, though could be the same (in which case a single rule would be sufficient).
Beware if C2 contains time as well as date the second rule above will not work (and not that formatting will only work for 7 days time, not 6 nor 8 ahead etc, only seventh day from today not counting today).
TODAY() could be part of the formulae (if adjusted) - does not need to bein a separate cell.
To apply to ore than one cell (eg an entire column) is quite possible with slight adjustments.

Resources