Function Problems

Excel IF Formula to Assign Scores to Yes or No Responses

Jason MillerJason Miller Dec 2, 2026 868 views

Question details

Assign a score to a Yes or No response using an Excel formula.

Assign Scores to Yes or No Responses in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
A worksheet contains responses and separate cells for the criterion and scores.
Observed behavior
The formula should return the Yes score when the response matches the criterion and the alternative score otherwise.
Before you start

Identify the response cell, the cell containing the Yes criterion, and the cells containing the Yes and No scores. In the example below, these are B1, B9, C9, and E9 respectively.

Solution 1Recommended

Use an IF formula to assign the response score

Compare the response with a Yes criterion and return the corresponding score.

1
Enter the criterion and scores

In Excel, enter Yes in B9, the Yes score in C9, and the No score in E9. Enter the response in B1.

2
Enter the formula

Select an empty score cell and enter =IF(B1=B9,C9,E9), then press Enter.

3
Copy for other responses

Drag the score cell's fill handle to copy the formula to other questions. Check and adjust the references if each question uses different criterion or score cells.

Use an IF formula to assign the response score
Other responses use the alternative score: The formula returns the value in E9 whenever B1 does not match B9, including when B1 is blank or contains unexpected text. To keep B9, C9, and E9 fixed when copying, use =IF(B1=$B$9,$C$9,$E$9).
Score responses in WPS Spreadsheets

Assign Yes or No Scores in WPS Spreadsheets

Use the IF function in WPS Spreadsheets to compare a response with a criterion and return the appropriate score.

  1. 1. Open your worksheet: Open WPS Spreadsheets and select your worksheet, or create a new spreadsheet.
  2. 2. Enter the response and scores: Enter a response in B1, Yes in B9, the Yes score in C9, and the No score in E9.
  3. 3. Add the IF formula: Select an empty score cell, enter =IF(B1=$B$9,$C$9,$E$9), and press Enter.
  4. 4. Fill additional rows: Drag the formula cell's fill handle down to score responses in subsequent rows, keeping the criterion and score cells fixed.
Assign scores automatically with an IF formulaOpen and save Microsoft Excel XLSX filesCopy formulas across multiple responsesWork in a familiar spreadsheet interface
microsoft office alternative - wps office

Frequently Asked Questions

How do I give Yes a score of 1 and No a score of 0?

If the response is in B1, enter =IF(B1="Yes",1,0) in an empty cell. This also returns 0 for blank cells or any other response.

How can I keep the score cells fixed when copying the formula?

Use absolute references for the shared criterion and score cells: =IF(B1=$B$9,$C$9,$E$9). Then drag the formula cell's fill handle down.

Can the No response return a score other than zero?

Yes. Enter the desired No score in E9 and use =IF(B1=B9,C9,E9). The formula returns E9 whenever the response does not match B9.

How can I leave the score blank when the response cell is blank?

Use =IF(B1="","",IF(B1=$B$9,$C$9,$E$9)) in the score cell. A blank B1 produces a blank result; other nonmatching responses still receive the score in E9.