Select C6:C57 (with C6 the active cell), and use the formula option of CF with the formula
=AND($A6=$CA$21,C6="",WEEKDAY(TODAY(),2)=5)
choosing a red fill. Then copy C6:C57 and paste formats over the other columns that are not currently filled with other colors. That formula (and method of applying it) meets all these criteria
· Only apply the fill when it is currently Friday.
· Only want the empty cells in that row to be red fill.
· Only apply it to the cells in that row starting at Column C and ending at Column BW
· No red fill applied in other cells in that same row that already contain a color fill or text
· Want the red fill to disappear (cell by cell) once any value is typed into that cell.
For this requirement:
· I would like to still be able to override and manually set each cells fill color to red after typing in data (or have it stay red if the data was entered Friday or after – if that is possible)
- Copy this code.
- Right-Click the sheet tab
- Select "View Code"
- Paste the code into the window that appears.
- Save the file as a macro-enabled .xlsm file.
- Make changes to the Range("C:E,I:K,O:W,AA:AI")) to include all the columns of interest (I hope you see the pattern.)
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Target.Value = "" Then Exit Sub
If Intersect(Target, Range("C:E,I:K,O:W,AA:AI")) Is Nothing Then Exit Sub
If Intersect(Target, Range("6:57")) Is Nothing Then Exit Sub
If Cells(Target.Row, "A").Value < Range("CA21").Value Or _
(Application.Weekday(Date, 2) = 5 And Cells(Target.Row, "A").Value = Range("CA21").Value) Then
Target.Interior.ColorIndex = 3
End If
End Sub