Note: take a look at the third picture on this page to see that we swapped the last 2 arguments of the IF function. Working on the data of example 1, we want to compare the two excel columns B and C with the help of the EXACT function EXACT Function The exact function is a logical function in excel used to compare two strings or data with each other, and it gives us the result whether the both data are an exact match or not. This means that the formatting rule will go row by row and compare cells in Columns B and C. The formula has a dollar sign to fix columns, only changing rows.
You can also display the unique values in the second column. In the window on the right side, (1) select Custom formula is under Format rules and (2) enter the formula: Then (3) click on the fill color icon, (4) choose orange, and (5) click Done. Note: take a look at the second picture on this page to see that we swapped the last 2 arguments of the IF function.Ģ. Display the unique values in the first column (these values do not occur in the second column). Unique Values in Each Columnĭo you want to compare two columns by displaying the unique values in each column? Simply swap the last 2 arguments of the IF function.ġ. At step 2, we match each value in the second column with the range in the first column. Note: at step 1, we matched each value in the first column with the range in the second column.
You can also display the duplicates in the second column. As a result, the ISERROR function returns TRUE and the IF function returns an empty string.Ģ. The MATCH function in cell C4 returns a #N/A error (no letter D in the range B1:B7). Working on the data of example 1, we want to compare the two excel columns B and C with the help of the EXACT function EXACT Function The exact function is a logical function in excel used to compare two strings or data with each other, and it gives us the result whether the both data are an exact match or not. As a result, the ISERROR function returns FALSE and the IF function returns the value in cell A1. Display the duplicates in the first column (these values also occur in the second column).Įxplanation: the MATCH function in cell C1 returns the number 5 (letter A found at position 5 in the range B1:B7). Let's start by comparing two columns and displaying the duplicates.ġ.