Function Problems

Display a Message for Specific Numbers in an Excel Column

Camila MilosovichCamila Milosovich Nov 18, 2026 870 views

Question details

Display a message when a cell in a column contains a selected number or a matching text pattern.

Display a Message for Specific Numbers in an Excel Column
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.
Before you start

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.

Solution 1Recommended

Display a message for exact numeric matches

Use IF and OR when a cell must equal one of the specified numbers.

1
Enter the formula

In an empty cell such as E3, enter =IF(OR(D3=4108177,D3=4248742),"Certain message","").

2
Set your values and message

In the formula bar, replace 4108177 and 4248742 with your target numbers and replace Certain message with the text you want to display.

3
Copy the formula down

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 for exact numeric matches
Numbers stored as text: The example compares numeric values. If your source values are stored as text, convert them to numbers or compare them with quoted text values instead.
WPS Spreadsheet

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. 1. Open your spreadsheet: Open WPS Spreadsheet and select Open to choose your workbook.
  2. 2. Enter a matching formula: Select an empty cell such as E3 and enter =IF(OR(D3=4108177,D3=4248742),"Certain message","").
  3. 3. Customize the formula: Use the formula bar to replace the target numbers and message with your own values.
  4. 4. Fill the column: Select E3 and drag the fill handle down beside the rows you want to check.
Display a custom message for exact values or partial matchesOpen and save Microsoft Excel XLSX filesCopy formulas down a column with the fill handleWork in a familiar spreadsheet interface
microsoft office alternative - wps office

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".