Comment comparer deux tableaux Excel | Tutoriel
Table of Contents
Introduction
In this tutorial, we will learn how to compare two Excel tables to easily highlight differences between them. This skill is essential for data analysis and can save time when working with large datasets. By following the steps outlined below, you will be able to identify discrepancies efficiently.
Step 1: Prepare Your Data
- Open Excel and create two separate tables that you want to compare.
- Ensure that both tables are organized in a similar format (same number of columns, similar headers).
- It is helpful to have the tables side by side for easier comparison.
Step 2: Use Conditional Formatting
-
Select the first table.
-
Go to the "Home" tab in the ribbon.
-
Click on "Conditional Formatting."
-
Choose "New Rule."
-
Select "Use a formula to determine which cells to format."
-
Enter the following formula to compare the first cell of the first table with the corresponding cell in the second table:
=A1<>Sheet2!A1
-
Replace
Sheet2
with the actual name of the sheet where the second table is located. -
Choose a formatting style (e.g., fill color) to highlight differences.
-
Click "OK" to apply the rule.
Step 3: Apply Conditional Formatting to the Second Table
-
Repeat the process for the second table:
-
Select the second table.
-
Go to "Conditional Formatting" and create a new rule.
-
Use the formula:
=A1<>Sheet1!A1
-
Again, replace
Sheet1
with the name of the sheet where the first table is located. -
Select a different formatting style to distinguish it from the first table.
-
Click "OK" to apply the rule.
Step 4: Review Highlighted Differences
- After applying conditional formatting, review the highlighted cells in both tables.
- Cells that are formatted indicate discrepancies between the two tables.
- You can then decide how to address these differences, whether by correcting data or adjusting your analysis.
Conclusion
You have now learned how to compare two Excel tables using conditional formatting to highlight differences. This method is straightforward and efficient, allowing for quick identification of discrepancies. As a next step, consider exploring more advanced Excel functions, such as VLOOKUP or XLOOKUP, for further data analysis capabilities.