Function Problems

Copy Text Between Excel Sheets Except for a Specific Value

Huda QurayshiHuda Qurayshi Dec 2, 2026 869 views

Question details

Automatically copy text from one worksheet to another, displaying a blank when the source contains a specific code.

Copy Text to Another Excel Sheet Except for a Specific Value
Product
Microsoft Excel
Device & OS
not provided
Scenario
A destination worksheet should show the value of a source cell unless that cell contains NR.
Observed behavior
The destination should display a blank for NR and otherwise display the source cell's value.
Before you start

Identify the source worksheet name, source cell, and code to exclude. Confirm that the source and destination worksheets are in the same workbook.

Solution 1Recommended

Use an IF formula to exclude the specific value

Use this formula when the destination should update automatically as the source cell changes.

1
Select the destination cell

Open the destination worksheet in Excel and click the cell where the source text should appear.

2
Enter the formula

In the cell or formula bar, enter =IF(Sheet852478!C18="NR","",Sheet852478!C18) and press Enter.

3
Adapt the reference

Replace Sheet852478, C18, and NR with your source worksheet name, cell, and excluded code. If the sheet name contains spaces, enclose it in single quotes, such as 'Source Sheet'!C18.

4
Fill other cells if needed

Select the formula cell and drag its fill handle across or down to copy the formula to corresponding cells.

Use an IF formula to exclude the specific value
The cell contains a formula: When the source contains NR, the formula returns an empty string, so the destination looks blank but is not a truly empty cell.
WPS Spreadsheets

Copy Text Between Sheets with WPS Spreadsheets

Use the same IF formula in WPS Spreadsheets to display source text on another worksheet while excluding a chosen code.

  1. 1. Open the workbook: Open WPS Spreadsheets and use Open to select the workbook containing both worksheets.
  2. 2. Select the destination: Click the destination worksheet tab, then select the cell where you want the result.
  3. 3. Enter the IF formula: Type =IF(Sheet852478!C18="NR","",Sheet852478!C18) in the cell or formula bar, replacing the sheet name, cell reference, and code as needed, then press Enter.
  4. 4. Copy the formula: If you need results for adjacent cells, drag the selected cell's fill handle across or down.
Automatically updates the destination when the source value changesExcludes a specific code with a simple IF formulaSupports Microsoft Excel formats including XLSX and XLSProvides a familiar spreadsheet interface
microsoft office alternative - wps office

Frequently Asked Questions

How do I exclude a code other than NR?

Replace NR inside the quotation marks in the IF formula with the code you want to exclude. For example, use =IF(Sheet852478!C18="N/A","",Sheet852478!C18) to exclude N/A.

What if the source worksheet name contains spaces?

Enclose the worksheet name in single quotes in each reference, for example: =IF('Source Sheet'!C18="NR","",'Source Sheet'!C18).

Will the destination update when the source changes?

Yes. With automatic calculation enabled, the formula updates when the referenced source cell changes. In Excel, check Formulas > Calculation Options > Automatic if it does not update.

Is the destination cell really empty when the source is NR?

No. The formula returns an empty string, which displays as blank, but the destination cell still contains the formula.