PDA

View Full Version : Excel, Date find issue



Pete_alcock
01-29-2010, 07:15 AM
Hiya people

Im a bit of a VBA noob to be honest.

i just need a snippet of code to identify cells with a date which is 24 hours older than the current system date.
I am using the below code to put the current date in lblclock.caption.

Me![lblclock].Caption = Format$(Now(), "dd/mm/yyyy")

what i want to do is simply have a command button when click searches 'Sheet1' between A1 to A10 for dates that are 24 hours older than the lblclock.

Any help?

Regards

MaximS
01-29-2010, 10:17 AM
you can use conditional formating to mark all cells with 1 day difference.

type below as first condition "Formula Is"

=((NOW()-A1)<1)*( (NOW()-A1)> 0)