Quote Originally Posted by daddylonglegs
You have to be careful with a formula like

=sumproduct(--(A1:A100>=38718),--(a1:a100<39082))

If you use 1904 date system this won't work. More robust (it works whichever date system you use) and more transparent

=SUMPRODUCT(--(YEAR(A5:A93)=2006))
Thanks to both of you. I learn something new today so I get to go home.