PDA

View Full Version : Solved: past due report



EricM
05-24-2008, 05:40 PM
I am trying to search a colum for any date older then 1 day and to add it to a report to print out or email. I have tried numerous examples found here using datedif and dateserial and cannot seem to get them to work.My date format is mm/dd/yyyy. I cannot seem to get it to find anything.

Could someone please post or guide me in how to search Column "d2 - ?" (the first entry is in d2 but rows are added continuously) when a workbook opens.

I want to find every row the is 1 day old or more

attached is a example workbook.

Excel 2003

gwkenny
05-24-2008, 08:41 PM
You don't need datediff or dateserial.

If you are doing this manually. Just enter another column. If the new column is E, and your dates are in column D, then E2 is: =if(NOW()-D2>1,"1","0")

Copy that formula down and sort on the results. If you don't need exact 24 hours but past yesterday, then it would be the TODAY() function instead of now.

If you are doing this via code, then the test you want is:
NOW() - [range object referencing your date cell] > 1

or

DATE - [range object referencing your date cell] > 1

Good luck!