Conditional Formatting multiple rows in excel - excel

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)

Related

Excel Conditional Formatting - Highlight blank cells between

thanks in advance for the help.
I'm making a Gantt chart in Excel and am trying to integrate the capability to highlight the work week (WW). The idea is that one can select the WW from a drop down menu and the corresponding columns in the chart are highlighted. I am struggling with the conditional formatting formula to highlight the desired dates.
Here's a screen shot of how the chart is set up
I am able to highlight the column of the cell containing the WW value (e.g. in picture column I is highlighted as it contains "WW42" in cell I3. I would like to be able to highlight the days from Sunday to Saturday of each WW.
Most formulas (that I know) work on the value of the cells rather than their location or index. I have tried simply filling in all the blank cells with the WW value and then hiding the value, but the formatting isn't aesthetically pleasing and it's not efficient.
I have also tried merging the WW cells, but am unable to select all columns of the length of the merged cell, just the first column associated. For example, if I merged I3 to O3, conditional formatting will highlight that merged cell and only column I.
Any suggestions on how to approach this is greatly appreciated!
Attached is a screenshot of my structure with my conditional formating working as required. You'll need to adjust acording to your structure, but I used a formula-based conditional formating, with the rule:
=COUNTA($B$2:B$2)=$A$1 //Where A1 contains the workweek I want to highlight
Entered into cells $B$3:$V$6. Of course, in your case you'd have to change it to something like:
=COUNTA($B$2:B$2)+41-3=$A$1
Since your work weeks start at 42 and you have 3 extra headings you dont want added on your sum (ACTUAL START, ACTUAL DURATION and PERCENT COMPLETE). Also the header for the work week has to be a numeric value, but you can play around this to get what you need. Let me know if you'd need further help.
You do not need to use the third row for your conditional formatting, if row 4 has legal excel dates. The WEEKNUM() formula gives you exactly what you need.
If your Dropdown Menu is in cell B2 and consists of numbers from 1-52 then this should work for your conditional formatting:
=$B$2=WEEKNUM(D$1)
See attached photo.

Date Highlight Formula Excel conditional formatting

I making a leave Planner which highlight the calendar as per the dates
using these formulas
=IF(B6="",FALSE,SUMPRODUCT((B6>=INDIRECT("Table1[Start]"))*(B6<=INDIRECT("Table1[End]"))))
=IF(B6="",FALSE,SUMPRODUCT((B6>=INDIRECT("Table1[SD1]"))*(B6<=INDIRECT("Table1[ED1]"))))
I want to apply this formula on same row not on columns how i can give range of Rows or range of cells containing start dates and end dates so same color highlight for one row and other color for other row
The formulas would be:
=OR(SUMPRODUCT((B6<>"")*("abc"=INDIRECT("Table1[Names]"))*(B6>=INDIRECT("Table1[Start]"))*(B6<=INDIRECT("Table1[End]"))),SUMPRODUCT((B6<>"")*("abc"=INDIRECT("Table1[Names]"))*(B6>=INDIRECT("Table1[SD1]"))*(B6<=INDIRECT("Table1[ED1]"))),SUMPRODUCT((B6<>"")*("abc"=INDIRECT("Table1[Names]"))*(B6>=INDIRECT("Table1[SD1]"))*(B6<=INDIRECT("Table1[ED1]"))))
As you can see you will need to have a different rule for each name. And change the name.

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 based on a cell's color

I have a column with conditional formatting rules set to make the background one of three colors based on how close the date is in comparison to the current date (Today's date + 7, + 15, +30 days).
I want to extended the conditional format across to effect the entire row, rather than just the individual cell for the user more easily to see which item's date is approaching.
Is it possible to do a conditional format using a cell's format?
Update: To explain it further. Conditional format is set to a column: if a cell value is in between today's date and 7 days from today's date, it is formatted to have a green background. I want this format to extend across the ROW in which the value turns green.
Please try:
where the three formulae are:
Green =$A1<TODAY()+7
Orange =$A1<TODAY()+15
Yellow =$A1<TODAY()+30
and I have assumed each 'row' spans A:Z and your dates are in ColumnA.
This will highlight dates earlier than today also (though could easily be adjusted).
Just change the Applies to range to all the columns you want to be colored. You'll need to make sure you lock down the reference of the date column in the Conditional Formatting rule.
For example:
If your data is in columns A:H, then your Applies to range will be =$A:$H
If your date column is column C, then your conditional formatting rule (for C1) would be something like:
=AND($C1>=TODAY(),$C1<=TODAY()+7)

column shading by date range

I have a spreadsheet that has various rows filled in colours while the columns are set to months in text form - 'mmm'
what I want to do is format the sheet so the column that is the current month is shaded - for example - March - to show it is the current month. This will change as we move into April etc etc
I only want Current Month column to be shaded but I need to keep my original 'filled rows' as shown in the below screen example as they highlight other important info.
example sheet:-
Can anyone point me in the correct direction?
All advice very welcomed.
I am using Excel 2011 for Mac.
my hoped for result is something along the lines of the below:
Here's another Conditional Formatting formula that works with your setup. Add this formatting rule from A2 to L22 in your case:
=LOWER(A$1)= LOWER(TEXT(NOW(),"MMM"))
Note that the conditional formatting with override your row colors.
You can do this very easily with conditional formatting.
Suppose all your dates are in column E, you could do a conditional formatting rule such as:
=MONTH($E1) = MONTH(NOW())
Set it to all the data you want highlighted and then just choose the fill color you want.
Hope this helps.
If you insert a second row (it can be hidden) with month number (A2 = 1, B2=2, etc) then you can apply the following conditional format
=month(now())=A$2
and then apply formatting as you like.
You need to make sure that this applies to the entire range.

Resources