Just change to a:a to 1:1
=IF(COUNTIF(INDIRECT("A2:A"&COUNTA(1:1)),"<"&DATE(YEAR(C2)-2,MONTH(C2),DAY(C2))),"YES","NO")

Signature
Don Guillett
SalesAid Software
dguillett1@austin.rr.com
>
> That does exactly what i want it to cheers mate, but i cant seem to get
> it to work accross a row say only to include the cell range A5:D5.
> Sorry if its me being stupid.
Don Guillett - 03 Jul 2006 15:50 GMT
my bad but if you want a cell below to indicate why not just
=IF(a2<DATE(YEAR(TODAY())-2,MONTH(TODAY()),DAY(TODAY())),1,2)

Signature
Don Guillett
SalesAid Software
dguillett1@austin.rr.com
> Just change to a:a to 1:1
> =IF(COUNTIF(INDIRECT("A2:A"&COUNTA(1:1)),"<"&DATE(YEAR(C2)-2,MONTH(C2),DAY(C2))),"YES","NO")
>
>> That does exactly what i want it to cheers mate, but i cant seem to get
>> it to work accross a row say only to include the cell range A5:D5.
>> Sorry if its me being stupid.
johncouzins - 04 Jul 2006 17:07 GMT
> That does exactly what i want it to cheers mate, but i cant seem to
> get it to work accross a row say only to include the cell range A5:D5.
> Sorry if its me being stupid.
If your dates are across a row, you can use this version af the previous
formula:
=IF(COUNTIF(INDIRECT("A5:"&ADDRESS(5,COUNTA(5:5))),"<"&DATE(YEAR(A15)-2,MONTH(A15),DAY(A15))),"YES","NO")
Also in this version the rabge is dynamic. The assumption are:
- dates are in row 5, starting from A5;
- there is nothing but the dates in row 5.
To change this assumpiton you have to modify this part of the formula:
INDIRECT("A5:"&ADDRESS(5,COUNTA(5:5)))
You can also change to a staic range replacing the above with your stic
range.

Signature
Hope I helped you.
Thanks in advance for your feedback.
Ciao
Franz Verga from Italy