I'm very new to Excel and VBA. With that said, I'm trying to do an IF THEN statement where:
Dim ExpDate = Date +30
If Cells(i,6) < ExpDate Then
And the rest of the code will copy a different cell (without the date) on the active sheet onto another sheet.
I've been able to get this to do exactly what I want it to do when searching up a numerical value that resulted from a formula:
but it's not working for the dates.
Also, (and I don't know if this makes a difference) IF THEN with the dates is the second IF THEN in my FOR NEXT.
I don't know if VBA is comparing the formula with the ExpDate or if it's reading the acutal date and comparing it to ExpDate.
Can someone please help a VBA rookie find out where I'm going wrong?
Any help would be GREATLY appreciated!!!
Bookmarks