EdLB
asked on
Executing a conditional date check in vba
The value in X2 is a string date. The following code returns a value of "FALSE" in B2. I want it to execute the if statement and return a 1 or 0.
Dim EndDate As Date
EndDate = "1/1/2016"
Worksheets("PO_List").Rang e("B2").Fo rmula= "=If(" & DateValue(Range("X2")) <= DateValue(EndDate) & ",1,0)"
Dim EndDate As Date
EndDate = "1/1/2016"
Worksheets("PO_List").Rang
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Very simple, straightforward and it works.
try something like this:
Open in new window