Function Problems

Count Records by Source and Month with COUNTIFS in Excel

Steven ParkerSteven Parker Dec 2, 2026 868 views

Question details

Count records that match both a specified source and a month using COUNTIFS.

Count Records by Source and Month with COUNTIFS in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
A worksheet contains case records with source and month information, and the user wants a count for a selected combination.
Observed behavior
The desired result is a count of rows that meet both criteria.
Before you start

Identify the source and month columns and check that their ranges cover the same rows. Determine whether the month column contains text such as April or actual Excel dates.

Solution 1Recommended

Count a source and text month with COUNTIFS

Use this method when the month column contains month names as text.

1
Select a result cell

Click an empty cell where you want the count to appear.

2
Enter the COUNTIFS formula

Enter =COUNTIFS(A2:A100,"HP",B2:B100,"April") and press Enter. Replace A2:A100 with your source range and B2:B100 with your month range.

3
Use criteria from another sheet

To use values in Sheet2 cells A1 and B1 instead, enter =COUNTIFS(A2:A100,Sheet2!A1,B2:B100,Sheet2!B1). Put the source in Sheet2!A1 and the month name in Sheet2!B1.

Keep ranges aligned: Both criteria ranges must have the same dimensions and refer to corresponding rows. This formula counts the text April across all years unless you add a year criterion.
Count records in WPS Spreadsheets

Count Sources and Months in WPS Spreadsheets

Use COUNTIFS in WPS Spreadsheets to count rows that match a source and a text month, including criteria stored on another sheet.

  1. 1. Open your workbook: Open WPS Spreadsheets and select Open to load your workbook.
  2. 2. Select a result cell: Click an empty cell where you want the count.
  3. 3. Enter the formula: Type =COUNTIFS(A2:A100,"HP",B2:B100,"April") and press Enter. Adjust the ranges and criteria to match your worksheet.
  4. 4. Save your workbook: Select File > Save or Save As to keep the formula in your workbook.
Count records against multiple criteria with COUNTIFS.Open and edit Microsoft Excel XLSX and XLS files.Use a familiar spreadsheet interface to enter and update formulas.
microsoft office alternative - wps office

Frequently Asked Questions

Why does COUNTIFS return zero for April?

Check whether the month cells contain the text April or actual dates. If they are dates, use a start-of-month and next-month boundary instead of the text criterion "April".

Can I put the source and month criteria on another sheet?

Yes. For example, enter =COUNTIFS(A2:A100,Sheet2!A1,B2:B100,Sheet2!B1), with the source in Sheet2!A1 and the month in Sheet2!B1.

Do the COUNTIFS ranges have to be the same size?

Yes. Each criteria range must have the same dimensions and cover corresponding rows, such as A2:A100 and B2:B100.

How do I count April records for only one year?

If the month column contains dates, use a lower boundary of April 1 of the target year and an upper boundary of May 1. If it contains text month names, add a separate year range and criterion to COUNTIFS.