2. Select the table content range, that is, all the ranges that need to be counted.
3. Select a blank cell and enter the formula =COUNTIF(A 1:D8, "Shanghai"). Click the check mark at the bottom of the toolbar in the figure to count its times.
4. Calculation result 8, you can count the number of occurrences in a month in Excel.