WorksheetFunction.CountIfs (Excel)
Counts the number of cells within a range that meet multiple criteria.
Each cell in a range is counted only if all of the corresponding criteria specified are True for that cell. If a cell in any argument is an empty cell, CountIfs treats it as a 0 value. You can use the wildcard characters, question mark (?) and asterisk (*), in criteria. A question mark matches any single character; an asterisk matches any sequence of characters. If you want to find an actual question mark or asterisk, type a tilde (~) before the character.
CountIfs (Arg1, Arg2, ..., Arg30)
Dim dblCountIfs As Double
dblCountIfs = WorksheetFunction.CountIfs(Arg1:=, Arg2:=)
Arguments
Arg1, Arg2, ..., Arg30Arg1 (Range) - One or more ranges in which to evaluate the associated criteria.
Arg30 - One or more criteria in the form of a number, expression, cell reference, or text that define which cells will be counted. For example, criteria can be expressed as 32, "32", ">32", "apples", or B4