Excel IF Formula to Display Text Based on a Total
Question details
Display text from one of three cells according to the numeric total in D43.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- The user wants a formula in B44 that selects B46 for totals of 12 or less, C46 for totals from 13 through 19, and D46 for totals of 20 or higher.
- Observed behavior
- B44 should show the text associated with the range containing the total in D43.
Enter the total in D43 and the three text values in B46, C46, and D46. The ranges below assume D43 contains a whole-number total.
Use a Nested IF Formula in Excel
Select the appropriate text cell by testing the total against two thresholds.
In Excel, click cell B44, where you want the selected text to appear.
Type =IF(D43<=12,B46,IF(D43<=19,C46,D46)) in B44 and press Enter.
Change D43 to 12, 13, 19, and 20 in turn. B44 should display the values from B46, C46, C46, and D46, respectively.

Display Text Based on a Total in WPS Spreadsheet
Use the same nested IF formula in WPS Spreadsheet to return text from a cell based on the total in D43.
- 1. Open the workbook: Open WPS Spreadsheet and use Open to select your workbook.
- 2. Check the input cells: Enter a whole-number total in D43 and the desired text in B46, C46, and D46.
- 3. Enter the IF formula: Click B44, type =IF(D43<=12,B46,IF(D43<=19,C46,D46)), and press Enter.
- 4. Verify the result: Change D43 and check that B44 displays the text for the corresponding range.

Frequently Asked Questions
What does the formula return when D43 is 19?
It returns the value in C46 because 19 meets the second condition, D43<=19.
Can I type the text directly into the formula instead of using cells?
Yes. Replace the cell references with text in quotation marks, such as =IF(D43<=12,"Low",IF(D43<=19,"Medium","High")).
What happens if D43 contains a decimal?
The formula returns B46 for values up to 12, C46 for values above 12 through 19, and D46 for values above 19. Decide how decimal values should be classified before using these thresholds.
Why does Excel reject the formula when I enter it?
Check that the formula starts with an equals sign and uses <= for each comparison. If your Excel regional settings require semicolons as separators, replace the commas with semicolons.




