Excel Formula to Score Specific Text Entries (Y, N, PIF, N/A)
Question details
The user wants to calculate a score based on specific text entries (Y, N, PIF, N/A) where "Y" and "PIF" equal 1 point, and "N/A" is excluded, without altering source data or conditional formatting.

- Product
- Excel / WPS Spreadsheet
- Device & OS
- not provided
- Scenario
- Scoring or grading based on predefined text values in a spreadsheet.
- Observed behavior
- Needs a formula to output the total score while preserving the original text and formatting in the data range.
Ensure that your text entries do not contain accidental leading or trailing spaces, as this can affect the accuracy of formula calculations.
Use Multiple COUNTIF Functions to Score Entries
This method adds multiple COUNTIF functions to calculate the total points for "Y" and "PIF", automatically ignoring "N", "N/A", and blanks.
The COUNTIF function is designed to count the number of cells that meet a single condition. By adding two COUNTIF functions together, you can effectively score multiple text criteria in the same range without modifying the source cells.
Click on the blank cell where you want the total score to appear.
Type the formula =COUNTIF(A2:A100,"Y")+COUNTIF(A2:A100,"PIF") in the formula bar. Be sure to adjust the range A2:A100 to match your actual data.
Press Enter. The formula will calculate the total score by counting each occurrence of "Y" and "PIF" as 1 point each, while ignoring any other text like "N/A".

Use SUM and COUNTIF with an Array Constant
A more concise formula if you have multiple conditions to score in a single range.
Easily Score Text Entries in WPS Spreadsheet
WPS Spreadsheet offers full support for advanced functions like COUNTIF and SUMPRODUCT. You can easily score customized text entries and apply conditional formatting without affecting your original dataset.
- 1. Open your file: Launch WPS Office and open your workbook in WPS Spreadsheet.
- 2. Select the score cell: Click the specific cell where the final tallied score should be displayed.
- 3. Enter the formula: Input =COUNTIF(A2:A100,"Y")+COUNTIF(A2:A100,"PIF") in the formula bar.
- 4. Confirm the action: Press Enter to instantly view your calculated score while retaining all previous conditional formatting.

Frequently Asked Questions
Why is my COUNTIF formula returning 0?
Your data cells might contain extra spaces or hidden characters. Use the TRIM function to clean your data or check for trailing spaces after your text entries to ensure accurate matching.
Can I assign different point values to different text entries?
Yes. If you want "PIF" to be worth 2 points, you can multiply its count by 2 in the formula: =COUNTIF(A2:A100,"Y")+(COUNTIF(A2:A100,"PIF")*2).
How do I count cells that do not contain N/A?
To count all cells except those containing "N/A", you can use the formula =COUNTIF(A2:A100,"<>N/A"). Note that this approach will also include blanks and any other text present in the range.




