I have a countif to sum the amount of times "Yes" appears in column D.

when i hide a range of rows the formula still counts the hidden cells.

is there anyway i can do a count of all the "Yes"s in column D and not include the hidden rows?

Many thanks,

Nicko