I am currently trying to do a COUNTIFS on a closed sheet. Checking the forums, I have tried splitting the formula into COUNT(IF(, but as I was counting between two dates I need an IFAND. Can't work out how to calculate it

=COUNT(IF(AND('[DOC.xlsm]New'!$F$7:$F$2506,">="&$A$1,'[DOC.xlsm]New'!$F$7:$F$2506,"<="&$B$1),1))

A1 and B1 are the beginning and end date. It began life as the below formula which worked correctly.

=COUNTIFS('[DOC.xlsm]New'!$F:$F,">="&$A$1,'[DOC.xlsm]New'!$F:$F,"<="&$B$1)

Any help, much appreciated

Thanks

Rob