On the contrary, it does work, and it works quite well! You must not be applying it correctly.
The key is to NOT try to copy the formatting via Copy or Format Painter. Select the
whole range you want to apply it to (i.e. A1:A4 in this example), and then write the formula as it applied to the
very first cell in that selection (A1). If you use Mixed Range Referencing to lock down the rows, the formula will automatically adjust for the other cells in your selection (see:
https://www.excel-easy.com/functions/cell-references.html).
From the exact steps I mentioned in this thread, I have created a macro that sets up the example in this thread and correctly applies the Conditional Formatting. You can run it to see how it works.
Code:
Sub TestMacro1()
Range("A1") = "A"
Range("A2") = "B"
Range("A3") = "C"
Range("A4") = "D"
Range("CA1") = "B"
Range("CA2") = "D"
Range("CA3") = "F"
Range("CA4") = "G"
Range("A1:A4").FormatConditions.Add Type:=xlExpression, Formula1:= _
"=COUNTIF(CA$1:CA$4,A1)>0"
Range("A1:A4").FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Range("A1:A4").FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 65535
.TintAndShade = 0
End With
Range("A1:A4").FormatConditions(1).StopIfTrue = False
End Sub