How to Fix COUNTIFS #VALUE! Error When Counting Nonblank Cells
Question details
The user encounters a #VALUE! error when using the COUNTIFS function with an asterisk to count nonblank cells.

- Product
- Spreadsheet
- Device & OS
- not provided
- Scenario
- Using the COUNTIFS formula with multiple criteria ranges, including a wildcard (*) for nonblank entries.
- Observed behavior
- The formula returns a #VALUE! error instead of the expected cell count.
Double-check the cell references in your COUNTIFS formula to identify all the criteria ranges you are currently using.
Make All Criteria Ranges the Same Size
The COUNTIFS function requires all criteria ranges to have the exact same number of rows and columns. Mismatched ranges will trigger a #VALUE! error.
A common mistake when building multi-criteria formulas is combining an entire-column reference (like A:A) with a specifically defined range (like H2:H200). Because these two ranges have a different number of rows, the spreadsheet software cannot match the criteria row by row, resulting in a #VALUE! error.
Click on the cell displaying the #VALUE! error to view the formula in the Formula Bar.
Look at the range arguments you have entered. For example, if you see =COUNTIFS('Project1'!A:A, "Jan", 'Project1'!H2:H200, "*"), the ranges A:A and H2:H200 do not match.
Modify the shorter or longer range so they span the exact same number of rows. Change A:A to A2:A200 to match the second range.
Press Enter to save the updated formula, such as =COUNTIFS('Project1'!A2:A200, "Jan", 'Project1'!H2:H200, "*"). The correct count should now appear.

Use WPS Spreadsheet for Accurate Formula Calculations
WPS Spreadsheet provides comprehensive formula support, including COUNTIFS, with built-in argument wizards to help you easily align range sizes and avoid common syntax errors.
- 1. Open your workbook: Launch WPS Spreadsheet and open the document containing your data.
- 2. Insert the function: Select a blank cell, go to the 'Formulas' tab, and click 'Insert Function'.
- 3. Use the formula wizard: Search for COUNTIFS. The function dialog box will provide separate input fields for each Criteria_Range, making it easier to ensure they are visually identical in size.

Frequently Asked Questions
Why does the asterisk (*) work for counting nonblank cells?
The asterisk is a wildcard character that represents any sequence of text characters. When used as criteria in COUNTIFS, it effectively counts any cell containing text strings, bypassing empty cells.
Can I count nonblank cells containing numbers using an asterisk?
No, the asterisk wildcard only works for text values. To count cells containing numbers, dates, or any nonblank value, it is better to use the criteria "<>" instead of "*".
Does COUNTIFS treat formulas returning empty strings ("") as blank?
If a formula returns an empty string (""), the cell is not technically blank to some functions. However, using the "*" wildcard criteria will typically skip these empty strings, making it a popular workaround for visually blank cells.




