How to Count Categories and Monthly Transactions in Excel
Question details
The user needs to display two distinct values in a single cell: a total count of a specific category and a conditional count of that same category for a specific month (e.g., May 2024).

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Tracking spreadsheet entries and wanting to quickly see total vs. monthly volumes combined in one cell format, such as '100/20'.
- Observed behavior
- Using standard COUNTIFS can result in calculation errors if date criteria are incorrectly formatted, especially when combining concatenation logic with date ranges.
Ensure your dataset range contains standard date values rather than text strings, and verify the exact spelling of your category names to avoid zero-count calculation errors.
Combine COUNTIF and COUNTIFS Using the DATE Function
This is the most reliable method, as the DATE function avoids regional date format errors when calculating transactions for a specific month.
By utilizing the ampersand (&) operator, you can seamlessly concatenate the results of two separate functions into a single cell.
Using the DATE(year, month, day) function ensures that your logical criteria are perfectly interpreted as dates by Excel, regardless of the system's regional settings.
Click on the empty cell where you want the combined result (e.g., '100/20') to appear.
Type `=COUNTIF('Enquiry List'!C1:C30, "Land & Property Lease/Rent")` to calculate the total count of the category.
Directly after the first function, type `&"/"&` to append a slash separator between your two numbers.
Append the date-filtered formula: `COUNTIFS('Enquiry List'!C1:C30, "Land & Property Lease/Rent", 'Enquiry List'!A1:A30, ">="&DATE(2024,5,1), 'Enquiry List'!A1:A30, "<"&DATE(2024,6,1))`.
Press Enter. The cell will now output a text string showing the total count followed by the May 2024 count.

Use Text Date Strings in COUNTIFS
A quicker alternative formula format, though it relies on your computer's regional date settings matching the entered text string (e.g., DD/MM/YYYY).
Easily Calculate Complex Formulas with WPS Spreadsheet
WPS Spreadsheet fully supports advanced Excel functions like COUNTIFS, DATE, and text concatenation, allowing you to easily process conditional counts and date filters. Enjoy a robust, familiar interface for all your data analysis tasks.
- 1. Open your workbook in WPS: Launch WPS Office and open your .xlsx file containing the transaction data.
- 2. Select the target cell: Click on the cell where you want to output the concatenated count result.
- 3. Enter the formula: Type the combined COUNTIF and COUNTIFS formula using the DATE function into the formula bar.
- 4. Press Enter: Hit Enter to execute the formula and instantly view your categorized monthly counts.

Frequently Asked Questions
Why does my COUNTIFS formula return a zero when checking dates?
This typically occurs if the dates in your criteria range are stored as text strings instead of valid date serial numbers. You can resolve this by selecting your date column, navigating to Data > Text to Columns, and clicking Finish to convert them into readable dates.
Can I add descriptive text to the concatenated formula result?
Yes. You can append descriptive labels by enclosing the text in quotation marks and joining them with ampersands. For example: `="Total: " & COUNTIF(...) & " | May: " & COUNTIFS(...)`.
How do I count transactions using a dynamic cell reference instead of hardcoded dates?
Instead of typing the DATE function directly into the formula, you can reference cells containing your start and end dates. Replace the date strings with cell references like this: `">=" & E1` and `"<" & F1`, assuming E1 and F1 hold your boundary dates.
Why am I getting a #VALUE! error in my concatenated formula?
A #VALUE! error often means the ranges used in your COUNTIFS function are not identical in size. Ensure that the category range (e.g., C1:C30) and the date range (e.g., A1:A30) span the exact same number of rows.




