REPLEN is a function you're trying to create? You can actually create a new function called REPLEN if you'd like. Put this in a separate module (Insert > Module):
Function REPLEN(RefCell As Range) As Boolean
Dim valARR As Variant, v As Long
valARR = Array("980514", "980520", "980523", "980541", "980592", "980658", "980764", "980765", "980875", "981149", "981176", "981194")
For v = LBound(valARR) To UBound(valARR)
If CStr(RefCell(1)) = CStr(valARR(v)) Then
REPLEN = True
Exit Function
End If
Next v
End Function
Now that can be used in a cell as a formula like so:
=REPLEN(A2)
...and it will return a TRUE/FALSE answer, so it's perfect for use in an IF/THEN formula.
.Formula = "=IF(AND(Replen(A2)), B2<(TODAY()+7)), C2+C3, C3)"
Bookmarks