No you cannot use worksheet functions directly in a cell like that. You
either use worksheet functions fully
If Range("H2").Value Range("A2").Value - _
(WorksheetFunction.Weekday(Range("A2").Value) - 2) Then
or use the VBA function
If Range("H2").Value Range("A2").Value - _
Weekday(Range("A2").Value - 2) Then
MsgBox "yes"
End If
--
HTH
RP
(remove nothere from the email address if mailing direct)
"DKY" wrote in message
...
So I could probably do like this then.
If Range("H2") ((A2-(WEEKDAY(A2)-2)
)-7)
and it will give me something like this?
If Range("H2") (08/22/2005)
--
DKY
------------------------------------------------------------------------
DKY's Profile:
http://www.excelforum.com/member.php...o&userid=14515
View this thread: http://www.excelforum.com/showthread...hreadid=400172