Excel Formula to Return 0 for BR Text or a Lower Number
Question details
Create a formula that returns 0 when a cell contains BR or holds a number below a comparison value, and 1 otherwise.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A worksheet needs to test a cell for text and numeric conditions against a comparison cell.
- Observed behavior
- The desired result is 0 when either condition is met and 1 when neither condition is met.
Identify the cell to test and the cell containing the numeric comparison value. The example uses C2 as the test cell and E2 as the comparison cell; adjust the references for your worksheet.
Use IF, SEARCH, and ISNUMBER to test both conditions
Use this formula when BR can appear anywhere in the test cell and numeric values should be compared with E2.
SEARCH finds BR without regard to letter case. ISNUMBER checks whether C2 is numeric before the numeric condition is considered.
In Excel, click an empty cell where you want the result, such as F2.
Type =IF(OR(ISNUMBER(SEARCH("BR",C2)),AND(ISNUMBER(C2),C2<E2)),0,1) and press Enter.
Drag the fill handle from the result cell down the column to test additional rows.
Apply the Same Conditional Formula in WPS Spreadsheet
Use WPS Spreadsheet to test for BR text or a number below a comparison value with the same IF formula.
- 1. Open the workbook: Open WPS Office, select Spreadsheet, and open your workbook.
- 2. Check the source cells: Place the value to test in C2 and a numeric comparison value in E2, or identify the corresponding cells in your sheet.
- 3. Enter the formula: Click an empty result cell and enter =IF(OR(ISNUMBER(SEARCH("BR",C2)),AND(ISNUMBER(C2),C2<E2)),0,1), then press Enter.
- 4. Fill additional rows: Drag the result cell's fill handle down to apply the formula to other rows.

Frequently Asked Questions
Does the formula match lowercase br?
Yes. SEARCH is not case-sensitive, so it matches BR, br, and mixed-case variations anywhere in C2.
What happens if the number in C2 equals E2?
The formula returns 1 unless C2 also contains BR. The C2<E2 condition only matches numbers strictly below E2.
Why is a number stored as text not compared?
ISNUMBER(C2) returns FALSE for numbers stored as text. Convert the value to a number, for example by selecting the cell and using the warning icon's Convert to Number option when available.
How do I keep the comparison cell fixed when copying the formula?
Replace E2 with $E$2 in the formula, then drag the result cell's fill handle down. Each row will be compared with E2.




