Я не совсем уверен, что вы делаете, но так как у меня есть этот код в любом случае ...
Function Tester(rngLookup As Range, v)
Dim c As Range, f As Range, clr As Long
Set c = Application.ThisCell '<< the cell with the formula
Set f = rngLookup.Find(v, lookat:=xlWhole)
If Not f Is Nothing Then
clr = f.Interior.Color
Else
clr = vbWhite
End If
'change the background for the cell with the formula
Application.Evaluate "ChangeColor(""" & c.Parent.Name & """,""" & c.Address() & """," & clr & ")"
Tester = v 'or whatever is appropriate...
End Function
Sub ChangeColor(sht As String, addr As String, clr As Long)
ThisWorkbook.Sheets(sht).Range(addr).Interior.Color = clr
End Sub
Пример использования (с включенными формулами шоу):