|Excel has a function called COUNTIF.|
It will count the number entires in a range that match the criteria given.
For example, for the following example, both of these formulas will return 3:
The first formula has the criteria "hardcoded" into the formula (the quotes and equal sign are required), the second formula uses the value in A1 as the criteria (no quotes or equal sign).
Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.