Table of Contents
To compare four columns in Excel, first select all four columns by clicking and dragging over them. Then, go to the Home” tab and click on the “Conditional Formatting” button. From the drop-down menu, select Highlight Cells Rules” and then choose “Duplicate Values”. A new window will appear, allowing you to customize the formatting for the duplicate cells. Once finished, click “OK” and the cells with duplicate values across all four columns will be highlighted for easy comparison.
Compare Four Columns in Excel (With Example)
You can use the following basic formula to compare four columns in Excel:
=IF(AND(B2=C2,C2=D2,D2=E2),"Equal","Not Equal")
This particular formula compares the values in cells B2, C2, D2 and E2.
If all of the values are equal, the formula returns Equal. Otherwise, it returns Not Equal.
The following example shows how to use this formula in practice.
Example: Compare Four Columns in Excel
Suppose we have the following dataset that shows the highest scorer on various basketball teams during four different games:

We can type the following formula into cell F2 to test if the four values in the first row are all equal:
=IF(AND(B2=C2,C2=D2,D2=E2),"Equal","Not Equal")
The following screenshot shows how to use this formula in practice:

The formula returns Not Equal since the four names in the first row don’t all match.
We can then drag this formula in cell F2 down to the remaining cells in column F to test for matches in each row:

Notice that the formula only returns Equal for the rows where the cell values are equal across each of the four columns.
You can also apply conditional formatting to the rows where all three cell values are equal by highlighting the cell range F2:F11, then clicking on the Conditional Formatting button on the Home tab, then clicking Highlight Cell Rules, then clicking Equal To:

In the new window that appears, type Equal into the box and choose a fill color, then click OK:

The rows that have matching values across all four columns will now be filled with green:

The following tutorials explain how to perform other common tasks in Excel:
Cite this article
stats writer (2024). How can I compare four columns in Excel?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-can-i-compare-four-columns-in-excel/
stats writer. "How can I compare four columns in Excel?." PSYCHOLOGICAL SCALES, 23 Jun. 2024, https://scales.arabpsychology.com/stats/how-can-i-compare-four-columns-in-excel/.
stats writer. "How can I compare four columns in Excel?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-can-i-compare-four-columns-in-excel/.
stats writer (2024) 'How can I compare four columns in Excel?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-can-i-compare-four-columns-in-excel/.
[1] stats writer, "How can I compare four columns in Excel?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, June, 2024.
stats writer. How can I compare four columns in Excel?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.
