I have a formula that tests to see if a Date entered in a cell falls within a certain Week.
The formula is:
=IF(A2="","",IF(AND(A2>=(WE-6),A2<=WE),"","Invalid Date"))
Where "WE" equals a Week Ending Date previously selected on another sheet (ie: Week Ending: Feb 9, 2008).
If I place this formula in a cell it will put "Invalid Date" in it if I enter a date that is not within 7 days of the "WE" date in cell A2.
My question is can I create a Macro that will put "Invalid Date" in cell A2 after the user originally enters a date in cell A2 that is not within the 7 Days of the Week Ending Date?
I would like it to enter the "Invalid Date" text immediately and this needs to occur on several cells (ie: Range = A2:A200).
I can't seem to create an "IF/Then" statement that will work.
Thanks for any and all assistance.
Bookmarks