Display a Message for Specific Numbers in an Excel Column
Question details
Display a message when a cell in a column contains a selected number or a matching text pattern.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Check values in column D and show a message in another column when a value matches the specified criteria.
- Observed behavior
- Matching rows should display a message, while nonmatching rows should remain blank.
Identify the column and first row to check, and choose an empty output column. Decide whether you need an exact numeric match or a match for digits appearing anywhere in a cell.
Display a message for exact numeric matches
Use IF and OR when a cell must equal one of the specified numbers.
In an empty cell such as E3, enter =IF(OR(D3=4108177,D3=4248742),"Certain message","").
In the formula bar, replace 4108177 and 4248742 with your target numbers and replace Certain message with the text you want to display.
Select E3 and drag its fill handle down beside the data in column D. Each row displays the message if its D cell matches either number; otherwise, it remains blank.

Display a message when digits appear within a cell
Use SEARCH when the target digits can appear anywhere in the cell rather than matching the whole value.
Find matching numbers with formulas in WPS Spreadsheet
Use IF, OR and SEARCH in WPS Spreadsheet to show a message beside exact numbers or digit patterns in a column.
- 1. Open your spreadsheet: Open WPS Spreadsheet and select Open to choose your workbook.
- 2. Enter a matching formula: Select an empty cell such as E3 and enter =IF(OR(D3=4108177,D3=4248742),"Certain message","").
- 3. Customize the formula: Use the formula bar to replace the target numbers and message with your own values.
- 4. Fill the column: Select E3 and drag the fill handle down beside the rows you want to check.

Frequently Asked Questions
How do I check more than two numbers?
Add another comparison inside OR. For example, use =IF(OR(D3=4108177,D3=4248742,D3=1234567),"Match","") in the output cell.
How can I show a different message when there is no match?
Replace the final empty string in the IF formula with your message. For example, =IF(OR(D3=4108177,D3=4248742),"Match","No match").
Will SEARCH find digits that are part of a longer value?
Yes. SEARCH("3",D3) finds 3 anywhere in the cell, including within 13 or text containing 3. Use an equality comparison such as D3=3 for an exact numeric match.
Why does an exact number comparison not match my cell?
The source value may be stored as text rather than as a number. Check the cell in column D, then convert it to a number or compare it with a quoted text value such as D3="4108177".




