How to Use Excel IF Formula to Display DQ for Disqualified Scores
Question details
The user needs an Excel formula to display "DQ" in a total-score cell if specific cells contain "DQ", otherwise calculate the sum of the required score cells.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Calculating total scores where certain conditions, such as a disqualification in specific rounds or categories, must override the standard sum calculation.
- Observed behavior
- The user wants to dynamically output a specific text string ("DQ") or a calculated numerical sum depending on whether the text "DQ" appears in the referenced cells.
Ensure that the reference cells for the "DQ" status and the score values are formatted correctly, containing no hidden spaces that might prevent the formula from recognizing the exact text string.
Combine IF, OR, and SUM Functions
Use the OR function inside an IF statement to check multiple cells for "DQ" and calculate the total score if neither cell contains the disqualification text.
Because the condition needs to trigger when "DQ" appears in either of the specified columns, you must use the OR function rather than the AND function. The formula checks if the condition is met; if true, it outputs the text, otherwise, it calculates the sum.
Click on the total-score cell where you want the final result to appear.
Type the formula: =IF(OR(O5="DQ",P5="DQ"),"DQ",SUM(C4,E4,G4,I4,Q4:T4)) into the formula bar.
Press Enter. The cell will now display "DQ" if either O5 or P5 has "DQ". Otherwise, it will calculate the sum of the provided cell ranges.

Manage Complex Formulas Seamlessly with WPS Spreadsheet
WPS Spreadsheet fully supports Excel functions like IF, OR, and SUM. You can effortlessly build, edit, and troubleshoot nested formulas for scoring and advanced data management.
- 1. Open your spreadsheet: Launch WPS Spreadsheet and open the workbook containing your score data.
- 2. Select the total cell: Click on the cell where you want to output the conditional sum or the DQ text.
- 3. Input the formula: Type =IF(OR(O5="DQ",P5="DQ"),"DQ",SUM(C4,E4,G4,I4,Q4:T4)) and hit Enter.
- 4. Apply to other rows: Click and drag the fill handle at the bottom right corner of the cell downwards to apply the formula to the remaining rows.

Frequently Asked Questions
Why does my IF formula return a #NAME? error?
This usually happens if a function name is misspelled (such as typing IFF instead of IF) or if you forget to enclose text strings like "DQ" in double quotation marks within the formula.
Can I check more than two cells for the DQ status?
Yes, you can add more arguments inside the OR function. For example, using OR(O5="DQ", P5="DQ", Q5="DQ") will check three different cells to see if any of them contain the disqualification text.
How do I change the formula to display a blank cell instead of DQ?
To leave the cell blank when disqualified, replace the "DQ" output in the IF formula with empty double quotes (""). The updated formula would look like this: =IF(OR(O5="DQ",P5="DQ"),"",SUM(C4,E4,G4,I4,Q4:T4)).
Why does my formula display an error about too many arguments?
This error occurs if your parentheses are misplaced or if you haven't closed the OR function properly before moving on to the "value_if_true" argument of the IF function. Ensure the OR section is fully enclosed in its own parentheses.




