Event validating two ranges with dates

  • Thread starter Thread starter G R E G
  • Start date Start date
G

G R E G

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
 
=SUMPRODUCT((A1:A500<=B1:B500)*(B1:B500<>"")*(A1:A500<>""))

will give you the count of bad dates in B.
 
Back
Top