I’m not in front a computer, but you can try this:
=AND(TEXT($B2,"dd/mm/yyyy")=TEXT(TODAY(),"dd/mm/yyyy"), OR(A1="FA_Win_3", A1="FA_Win_2"))
If you have trouble with users pasting over the cells and messing up with the conditional format, you can add this soubroutine to the worksheet.
To add it:
- Press F11
- Double click the sheet name
- Copy paste the code
- Read the comments inside the code and adapt it to fit your needs
- Save the workbook as macro-enabled
Private Sub Worksheet_Change(ByVal Target As Range)
' This method has a drawback and is that the undo feature in this sheet no longer works (if you can live with it, no problem)
' Here is an option to bring it back: https://www.jkp-ads.com/Articles/UndoWithVBA04.asp
' Define variables
Dim targetRange As Range
Dim formulaEval As String
' Define the Range where they paste the date. This is the range that receives the conditional format
Set targetRange = Range("B2:B70")
' Define the formula evaluated by the conditional format (replace ; for ,)
formulaEval = "=AND(TEXT(" B2 ",""dd/mm/yyyy"")=TEXT(TODAY(),""dd/mm/yyyy""), OR(A" 2 "=""FA_Win_3"", A" 2 "=""FA_Win_2""))"
If Not Intersect(Target, targetRange) Is Nothing Then
With Target
.FormatConditions.Add Type:=xlExpression, Formula1:=formulaEval
.FormatConditions(.FormatConditions.Count).SetFirstPriority
' This is where the format applied is defined (you can record a macro and replace the code here)
With .FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = RGB(0, 176, 80)
.TintAndShade = 0
.Font.Color = RGB(255, 255, 255)
.Font.Bold = True
End With
.FormatConditions(1).StopIfTrue = False
End With
End If
End Sub
Please mark this answer if it helped you