=COUNTIF(RANGE, CONDITION) Example: =COUNTIF(C1:C30, "Paris")
Application.WorksheetFunction.Subtotal(3, Range("A2:A500000"))