View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Event validating two ranges with dates

=SUMPRODUCT((A1:A500<=B1:B500)*(B1:B500<"")*(A1:A 500<""))

will give you the count of bad dates in B.

--
Regards,
Tom Ogilvy

G R E G <Greg@*.* wrote in message
...
Hi,

I would like to validate two ranges with dates using
Worksheet_Change event.

The date in the first column should be always greater than
a corresponding entry on the same row of the next column.

Data Validation is not an option since both columns will
be pasted from another source.

Is it possible to do with Intersect (rng1, rng2) or I need
to loop thru ?

Also, I wonder how I could count the “wrong” dates in the
second column and have a message saying for example
something like “Column B has 20 cells with incorrect
dates?”

Thanks much,
Greg