Formula Errors

Fix a ChatGPT-Generated Excel Nested IF Formula for Yes or No Results

Adam DavisAdam Davis Nov 12, 2026 868 views

Question details

Correct a nested IF formula that calculates a percentage from threshold values, compares the result with another cell, and returns Yes or No.

Fix a ChatGPT-Generated Excel Nested IF Formula for Yes or No Results
Product
Microsoft Excel formula
Device & OS
not provided
Scenario
The user needs to validate or repair a formula generated by ChatGPT for a threshold-based calculation.
Observed behavior
The intended result is Yes when the calculated value is less than the value in A3; otherwise, the result should be No.
Before you start

Confirm that A1 contains the threshold value, A2 contains the number to multiply, and A3 contains the comparison target. Enter the formula in a result cell and use standard straight quotation marks around Yes and No.

Solution 1Recommended

Use a nested IF formula for the threshold calculation

Use this option when you need compatibility with Excel versions that may not support the IFS function.

This formula applies 40% when A1 is 10 or less, 20% when A1 is 11 to 50, 10% when A1 is 51 to 200, and 0 when A1 is greater than 200. It then compares the calculated amount with A3.

1
Select the result cell

Click the cell where you want the Yes or No result to appear, such as B2.

2
Enter the corrected formula

Type or paste =IF(A2*IF(A1<=10,0.4,IF(A1<=50,0.2,IF(A1<=200,0.1,0)))<A3,"Yes","No") in the formula bar.

3
Confirm the formula

Press Enter. The cell shows Yes when the threshold-based calculation is less than A3; otherwise, it shows No.

4
Copy the formula if needed

Drag the fill handle from the result cell down the column to apply the same relative-cell formula to additional rows.

Use a nested IF formula for the threshold calculation
Formula logic: The nested conditions are evaluated in order, so the later tests only apply after the earlier threshold tests are false.
Work with formulas in WPS Spreadsheet

Build and check nested IF formulas in WPS Spreadsheet

WPS Spreadsheet lets you enter, edit, and test nested IF or IFS formulas in a familiar worksheet interface. Use the formula bar to adjust threshold rules and immediately confirm whether the calculated value returns Yes or No.

  1. 1. Open the workbook in WPS Spreadsheet: Launch WPS Office, choose Spreadsheets, and open the Excel .xlsx or .xls file containing the formula.
  2. 2. Select the formula result cell: Click the cell that should display Yes or No, then use the formula bar above the worksheet.
  3. 3. Enter the nested IF formula: Paste =IF(A2*IF(A1<=10,0.4,IF(A1<=50,0.2,IF(A1<=200,0.1,0)))<A3,"Yes","No") and press Enter.
  4. 4. Test the threshold values: Change the values in A1, A2, or A3 and confirm that the result updates as expected.
Create threshold-based nested IF and IFS calculations with a familiar formula bar.Check calculated results against a target cell and return clear Yes or No values.Open and edit Microsoft Excel .xlsx and .xls workbooks with formula compatibility.Use a lightweight spreadsheet tool for everyday formula review and editing.
microsoft office alternative - wps office

Frequently Asked Questions

What does the nested IF formula return when A1 is greater than 200?

The inner calculation returns 0 when A1 is greater than 200. The formula then compares 0 with A3 and returns Yes if 0 is less than A3; otherwise, it returns No.

Why does the formula use A1<=50 instead of AND(A1>10,A1<=50)?

Because the IF tests run in order. Once A1<=10 is false, the next test of A1<=50 effectively covers values greater than 10 through 50 without needing an AND function.

How can I return No when the calculated value equals A3?

Use the less-than operator < before A3, as in ...)<A3. This returns Yes only when the calculated value is strictly less than A3; an equal value returns No.

Can I use IFS instead of nested IF in Excel?

Yes. In a version that supports IFS, enter =IF(IFS(A1<=10,A2*0.4,A1<=50,A2*0.2,A1<=200,A2*0.1,TRUE,0)<A3,"Yes","No"). The TRUE,0 pair provides the default result for values above 200.