How to Highlight Changed Cells After an Excel Import
Question details
The user needs to identify and highlight cells that have been modified after importing new Excel data by comparing it with a previous version.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Comparing a newly imported dataset with a previous or original version to spot updates, edits, or discrepancies.
- Observed behavior
- The user wants to visually highlight the modified data cells so that changes between the two versions are immediately obvious.
Ensure you have both the previous version of the data and the newly imported data accessible within the same workbook, placed on separate sheets for accurate comparison.
Use Conditional Formatting with Formulas
This method is perfect for small to medium-sized reports where the structure of the old and new datasets is identical.
By using a simple formula inside the Conditional Formatting rule, Excel can automatically check each cell in your newly imported data against the exact corresponding cell in your old data sheet.
Name the sheet containing your previous data 'OldData' and the sheet with the imported data 'NewData'. Ensure both tables start at the exact same cell (e.g., A1).
Go to the 'NewData' sheet and select the entire range of cells you want to compare.
Navigate to the Home tab, click on 'Conditional Formatting', and select 'New Rule'. Choose 'Use a formula to determine which cells to format'.
In the formula box, enter =A1<>OldData!A1 (assuming your selection starts at A1). Click 'Format', pick a fill color to highlight the changes, and click 'OK'.

Use Power Query for Larger Datasets
Best suited for complex, massive datasets or tables where rows might have shifted or been sorted differently.
Quickly Highlight Changed Cells with WPS Spreadsheet
WPS Spreadsheet provides powerful and intuitive conditional formatting features, allowing you to quickly compare imported datasets and highlight changed cells without complicated setups.
- 1. Open your workbook in WPS: Launch WPS Spreadsheet and open the file containing both your old and newly imported data.
- 2. Select the target data: Highlight the range in your newly imported sheet where you want to spot the changes.
- 3. Apply conditional formatting: Click 'Conditional Formatting' under the Home tab, select 'New Rule', and input your comparison formula (e.g., =A1<>OldData!A1).
- 4. Set the highlight style: Choose a distinctive background color and click 'OK' to instantly reveal all changed cells.

Frequently Asked Questions
Can I highlight changes without using complex formulas?
While basic conditional formatting offers built-in rules for duplicate values, comparing exact changes across two different sheets typically requires a simple formula like =A1<>Sheet2!A1. It acts as a direct cell-to-cell check.
Why is my conditional formatting formula highlighting blank cells?
If one sheet has blank cells and the other does not, the formula treats them as a mismatch and evaluates to TRUE. To ignore blanks, you can adjust your formula to include the AND function, such as =AND(A1<>"", A1<>OldData!A1).
Is it possible to compare imported data using VBA instead?
Yes. For highly complex or exceptionally large datasets where formulas might slow down the workbook, a VBA macro can be written to iterate through cells in both sheets and apply specific background colors to any mismatched cells permanently.
What if my imported data has new rows inserted?
If new rows are added or the sorting has changed, a direct cell-to-cell formula (like =A1<>OldData!A1) will highlight everything below the insertion point as a mismatch. In such cases, using Power Query or VLOOKUP to match unique IDs is highly recommended.




