Excel 2016 conditional formatting based on cell below - excel

I have a table with a weekly schedule. Row 2 shows the dates in the week, and row 1 shows the corresponding week day: =TEXT(B2;"dddd"), =TEXT(C2;"dddd") etc.
I have a rule that highlights the date if it is today, using the "built-in" condition.
I want the cell above (with the week day) to have the same formatting. How do I accomplish this?

See the image below in explanation of my comment above.. Even if the row 1 is text, if you select both rows in "Applies to" option, it will apply. Note that the column in relative(not fixed by $) in the formula reference.

Related

Display a "YTD" automatically for the current month with a worksheet level VBA code

can I have some ideas on how to construct this event level VBA on a worksheet level?
If current month matches the month on the cell 4 rows below ("BC5") then put "YTD" with black background in this cell ("BC1") and the previous cells in the row for the previous months.
For example, we are in June already so "YTD" should be already visible in the top row.
See image below.
Thank you.
Assuming the month headers in what looks like row 3 or 4 are real dates, you can use a formula like this in cell AX1 and copy to the right
=IF(TODAY()>AX4,"YTD","")
Then add conditional formatting to highlight cells that are equal to "YTD" and change the format to your liking.
Since there is also a LYTD (Last Year To Date), I have used the following solution:
=IF(MONTH(TODAY()) >= MONTH(AQ5), "LYTD", "")
Thank you Teylyn for the original solution.

Conditional Formatting multiple rows in 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)

Highlighting A Row Based On Current Date

I have a spreadsheet in which each row of column F has a specific date. I want the sheet to highlight the row which corresponds to the current date (today). Anyone knows how to do this?
You can use the conditional formatting formula:
=$F1=Today()
and apply to the range, say,
=$A$1:$F$10
Note: Using TODAY() means that when you open the sheet tomorrow, or any other day, it's going to see if the cell is equal to that day. To make it literally today, you can do:
=$F1=DATE(2018,01,25)

COUNTIF function if day of week is Tuesday

I need to count a column only if the corresponding cell in another column is a Tuesday. An example image is:
Initially, I was trying to use a COUNTIFS function paired with a WEEKDAY but I can't get it to work.
=COUNTIFS(B2:B32,TRUE,A2:A32,WEEKDAY(3))
or
=COUNTIFS(B2:B32,IF(A2=WEEKDAY(3),1,0))
Each unit needs to be counted on Tuesday every week. If they count a day before or after it's considered late. What needs to happen, is each unit needs to have a count of the number of days that they did count and then the number of days that they didn't count. In the past, I have accomplished this last part by a simple arithmetic formula based on the number of days in the month. In addition to the two counts, I also need any missed cells to be filled in with a red background.
The actual sheet has several tables in the same format ranging from 1 column to 65 columns.
Please try, in B34:
=SUM((WEEKDAY($A2:$A32)=3)*(B2:B32<>""))
entered with Ctrl+Shift+Enter and copied across to D34.
I am assuming you are able to count the number of Tuesdays in the relevant month and complete Row35 by deducting from that number the value in the cell immediately above.
Afterthought:
You have also what is really a completely separate question in your post (the red background) which I think is best handled with conditional formatting. Select B:D and in Conditional Formatting, New Rule... select Use a formula to determine which cells to format and under Format values where this formula is true: enter:
=AND(WEEKDAY($A1)=3,B1="")
Click Format..., select Fill and red, OK, OK.
You can insert an column B and fill it with the following formula:
=IF(WEEKDAY(A2)=3,1,"")
=IF(WEEKDAY(A3)=3,1,"")
...
Then you can count them with the following formulas:
Days counted =COUNTIFS(C$2:C$32,">0",$B$2:$B$32,1)
Days not counted =COUNTIFS(C$2:C$32,"",$B$2:$B$32,1)
You can hide the column B if you wish.

Conditional format to shade rows if value or date is found?

I am new to conditional formatting and trying to create a few functions that will work in Excel 2010.
First I am trying to grey out (or shade) all rows that contain a value less than or equal to 35 in column E.
Second I need to BOLD all rows that contain today or tomorrow's date in column G. It would be nice to exclude weekends. For example if today is Friday it would bold all columns with Friday and Monday in it.
I have not been been able to get either to work. Any help would be appreciated.
Ignoring the weekends, please try:
=$E1<=35
with grey fill and
=OR($G1=INT(NOW()),$G1=INT(NOW())+1)
with bold, each with Applies to:
=$A$1:$Z$100
Extend/adjust the Applies to: range to suit.
and to skip weekends (in place of the second formula above):
=AND($G1>=INT(NOW()),$G1<INT(NOW())+10-NETWORKDAYS($G1,$G1+7))
Edit re comment of 2013-08-16 14:00:28Z:
This is getting VERY messy but keeping the latest requirement as a separate condition (also bold) perhaps adding another formula (in any order as Stop If True should not be checked) would suit:
=AND(OR($G1=INT(NOW()),$G1=INT(NOW())+3),MOD(TODAY(),7)=6)
This will not embolden Sundays between emboldened Saturdays and Mondays.
(Based on Excel 2007 and UNTESTED)

Resources