Brilliant! Thanks NBVC. I always thought the criteria part of the countif function had to be enclosed in quote marks, which meant dragging down didn't work.

Thanks again!