Search code examples
exceldateexcel-formulaworksheet-functiondeadlines

If Date Exceeds Certain Date Then


How do I set a formula or VBA to get around this?

If Date Listed in Column A + (7 Days) Exceed 5th of Upcoming Month then Do Something.

Its like 5th of Each Month is Deadline.
If Column A = 30th March 2015 +(7days)left = 6th April 2015 then Column B = "HolyCrap" Else "You're Safe"

I would really appreciate some help on this.


Solution

  • Let's try this formula:

    =IF(AND(DAY(A1+7)>5,DAY(A1+7)<13),"screwed","safe")
    

    The date in A1 could be in either Date or Number format. You would get the correct Number format after pressing Ctrl+;.

    Please test it and let me know if for some date it does not return the correct result.