Function Problems

WPS Spreadsheet: Return YES, CHECK, or NO from Risk Scores

Ayan MasoodAyan Masood Nov 12, 2026 869 views

Question details

The user needs to classify numeric risk scores as YES, CHECK, or NO and apply a matching cell color.

Product
WPS Spreadsheet
Device & OS
not provided
Scenario
A risk score is entered in a worksheet, and the user wants a text classification with visual color coding.
Observed behavior
The worksheet needs to return YES for scores 1–4, CHECK for scores 5–7, NO for scores 8–20, and an out-of-range message for other values, with green, blue, and red formatting.
Before you start

Confirm that the risk score is in column A and that the result will be entered in column B. Decide whether scores outside 1–20 should display “Out of range” or another message before creating the formula.

Solution 1Recommended

Use XLOOKUP to classify the risk score and add matching colors

Use this approach when the score bands are fixed and you want a compact formula that also handles values outside the valid range.

The approximate-match XLOOKUP uses the starting value of each band: 1, 5, 8, and 21. This returns YES for 1–4, CHECK for 5–7, NO for 8–20, and an out-of-range message for other values.

1
Enter the classification formula

In cell B2, enter =XLOOKUP(A2,{1,5,8,21},{"YES","CHECK","NO","Out of range"},"Out of range",-1), then press Enter. Replace A2 with the cell containing the risk score if needed.

2
Fill the formula down

Select B2 and drag the fill handle down, or copy and paste the formula into the remaining rows containing risk scores.

3
Open conditional formatting

Select the result range, such as B2:B100, then choose Home > Conditional Formatting > Highlight Cells Rules > Text that Contains in WPS Spreadsheet.

4
Format each returned value

Create a rule for YES with a green fill, a rule for CHECK with a blue fill, and a rule for NO with a red fill. Apply the rules to the same result range.

Expected results: A score of 3 returns YES, 6 returns CHECK, and 12 returns NO. Scores below 1 or above 20 return Out of range and do not match the three color rules.

Classify and color-code risk scores in WPS Spreadsheet

WPS Spreadsheet can evaluate score ranges with XLOOKUP or IFS, fill the result down a table, and apply conditional formatting so YES, CHECK, and NO are immediately recognizable.

  1. 1. Create the result column: Open WPS Spreadsheet, place the risk score in column A, and select B2 for the classification result.
  2. 2. Add the formula: Enter =XLOOKUP(A2,{1,5,8,21},{"YES","CHECK","NO","Out of range"},"Out of range",-1) in B2, or use the IFS alternative for explicit conditions.
  3. 3. Fill the result range: Copy B2 down alongside all score entries so every risk score receives a classification.
  4. 4. Add conditional formatting: Select the result range and use Home > Conditional Formatting > Highlight Cells Rules > Text that Contains to assign green to YES, blue to CHECK, and red to NO.
Classify risk scores with a single XLOOKUP or IFS formulaApply green, blue, and red conditional formatting to returned labelsOpen and save Microsoft Excel XLSX workbooks with compatible spreadsheet formattingUse a familiar spreadsheet interface for formulas, ranges, and conditional rules
microsoft office alternative - wps office

Frequently Asked Questions

What formula returns YES, CHECK, and NO for the specified score ranges?

If the score is in A2, enter =XLOOKUP(A2,{1,5,8,21},{"YES","CHECK","NO","Out of range"},"Out of range",-1) in B2. It maps 1–4 to YES, 5–7 to CHECK, and 8–20 to NO.

How do I color YES, CHECK, and NO in WPS Spreadsheet?

Select the returned text range, choose Home > Conditional Formatting > Highlight Cells Rules > Text that Contains, and create three rules: YES with green formatting, CHECK with blue formatting, and NO with red formatting.

What happens when the risk score is outside 1 to 20?

The XLOOKUP formula returns Out of range for values below 1 or above 20. The IFS version returns the same message through its final TRUE condition.

Can I use IF instead of XLOOKUP in WPS Spreadsheet?

Yes. For example, use =IF(AND(A2>=1,A2<=4),"YES",IF(AND(A2>=5,A2<=7),"CHECK",IF(AND(A2>=8,A2<=20),"NO","Out of range"))) in B2.