Option Explicit
Function test() As Variant
Dim r As Range
test = ""
If Application.Caller.Offset(0, -2).Value >= 1 And Application.Caller.Offset(0, -2).Value <= 5 Then
For Each r In [B2:F2]
If r.Value = Application.Caller.Offset(0, -1).Value Then
test = 1
Exit Function
End If
Next r
End If
End Function