gheyman
Well-known Member
- Joined
- Nov 14, 2005
- Messages
- 2,341
- Office Version
- 365
- Platform
- Windows
I need to check to see if there are dates and that the data entered into D1 and D2 are actual dates. I used Data validation to check format. I also used the validation to ensure the date in D2 is greater than D1. But I would also like to use VBA as a backup in case someone removes the validation.
1) I want to check that the data in D1 and D2 are "dates" (both fields must have dates). If either one is not, delete the data, format to a date and use the following conditions:
2) If there is a Date in D1 I need to verify that is is not "today". If it is I need to change it to yesterday (Now()-1)
3) If D1 is blank I want to automatically put in a date (January 1, 2000 or 01/012000....)
4) If D2 is blank make it today's date. If its not blank check to make sure its greater then D1. If its not then D1's date plus 360 days.
Thanks for the Help!!!! All this is done on Sheet1
1) I want to check that the data in D1 and D2 are "dates" (both fields must have dates). If either one is not, delete the data, format to a date and use the following conditions:
2) If there is a Date in D1 I need to verify that is is not "today". If it is I need to change it to yesterday (Now()-1)
3) If D1 is blank I want to automatically put in a date (January 1, 2000 or 01/012000....)
4) If D2 is blank make it today's date. If its not blank check to make sure its greater then D1. If its not then D1's date plus 360 days.
Thanks for the Help!!!! All this is done on Sheet1