Copy Text Between Excel Sheets Except for a Specific Value
Question details
Automatically copy text from one worksheet to another, displaying a blank when the source contains a specific code.

- 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.
Identify the source worksheet name, source cell, and code to exclude. Confirm that the source and destination worksheets are in the same workbook.
Use an IF formula to exclude the specific value
Use this formula when the destination should update automatically as the source cell changes.
Open the destination worksheet in Excel and click the cell where the source text should appear.
In the cell or formula bar, enter =IF(Sheet852478!C18="NR","",Sheet852478!C18) and press Enter.
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.
Select the formula cell and drag its fill handle across or down to copy the formula to corresponding cells.

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. Open the workbook: Open WPS Spreadsheets and use Open to select the workbook containing both worksheets.
- 2. Select the destination: Click the destination worksheet tab, then select the cell where you want the result.
- 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. Copy the formula: If you need results for adjacent cells, drag the selected cell's fill handle across or down.

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.




