Microsoft Excel 에서 여러 열의 값을 비교하려는 경우 눈알 이상의 기능을 사용할 수 있습니다. 고유하거나 중복된 값을 강조표시하고, 일치 항목에 대해 True(True) 또는 False를(False) 표시하거나 , 두 열에 정확히 어떤 값이 나타나는지 확인할 수 있습니다.
다섯 가지 방법을 사용하여 Excel 에서 두 열을 비교하는 방법을 보여 드리겠습니다 . 이를 통해 귀하의 필요와 Excel(Excel) 워크시트 의 데이터에 가장 적합한 것을 선택할 수 있습니다 .
(Highlight Unique)조건부(Conditional) 서식을
사용하여 고유하거나 중복 된(Duplicate) 값 강조 표시
열에서 중복된 값이나 고유한 값을 찾으려면 조건부 서식 규칙을 설정하면(set up a conditional formatting rule) 됩니다 . 강조 표시된 값을 확인한 후에는 필요한 모든 조치를 취할 수 있습니다.
이 방법을 사용하면 규칙은 행별로가 아닌 전체 열의 값을 비교합니다.
- 비교하려는 열을 선택하세요. 그런 다음 홈 탭으로 이동하여 (Home)조건부 서식(Conditional Formatting) 드롭다운 메뉴를 열고 새 규칙 을(New Rule) 선택합니다 .

- (Pick Format)새 서식 규칙(New Formatting Rule) 상자 상단에서 고유하거나 중복된 값만 서식을 선택합니다 .
- 모두 형식(Format) 드롭다운 상자
에서 강조 표시하려는 항목에 따라 고유 또는 중복을 선택합니다.

- 서식(Format) 버튼을 선택 하고 탭을 사용하여 원하는 서식 스타일을 선택합니다. 예를 들어 글꼴(Font) 탭을 사용하여 텍스트 색상을 선택하거나 채우기(Fill) 탭을 사용하여 셀 색상을 선택할 수 있습니다. 확인을 선택합니다(Select OK) .

- 그러면 고유 또는 중복 값이 어떻게 표시되는지 미리 볼 수 있습니다. 확인을 선택하여(Select OK) 규칙을 적용합니다.

강조표시된 값이 표시(see the values highlighted) 되면 원하는 대로 조치를 취할 수 있습니다. 이 예에서는 중복 값이 있는 셀을 노란색으로 채웠습니다.

Go(Compare Columns Using Go) To Special을 사용하여 열 비교(Special)
행별로 열의 차이점을 보려면 Go To Special 기능을 사용할 수 있습니다. 이는 필요한 작업을 수행할 수 있도록 고유한 값을 일시적으로 강조 표시합니다.
(Remember)이 방법을 사용하면 이 기능은 전체가 아닌 행당 값을 비교한다는 점을
기억하세요 .
- (Select)비교하려는 열 또는 열의 셀을 선택합니다 . 홈(Home) 탭 으로 이동하여 찾기(Find) 및 선택(Select) 드롭다운 메뉴를 열고 특수 항목(Special) 으로 이동 을 선택합니다 .

- 표시되는 대화 상자에서 행(Row) 차이를 선택하고 확인을 선택합니다.

- 그러면 첫 번째 열과 다른 두 번째 열에서 선택된 행의 셀이 표시됩니다.

몇 가지 차이점만 있으면 즉시 조치를 취할 수 있습니다. 셀이 많은 경우 선택한 셀을 유지하고 홈(Home) 탭 에서 채우기 색상을 선택하여 (Fill Color)셀을 영구적으로 강조 표시(highlight the cells) 할 수 있습니다 . 이렇게 하면 필요한 작업을 수행하는 데 더 많은 시간을 확보할 수 있습니다.

True(Compare Columns Using True) 또는 False를 사용하여 열 비교(False)
글꼴이나 셀 서식 없이 데이터세트에서 일치 항목과 차이점을 찾는 것을 선호할 수도 있습니다. 함수 없이 간단한 수식을 사용하여 동일한 값에 대해
True를 표시하거나 그렇지 않은 값에 대해 False를 표시할 수 있습니다.(True)
이 방법을 사용하면 수식은 전체가 아닌 행당 값을 비교합니다.
- 비교하려는 처음 두 값이 포함된 행으로 이동하여 오른쪽에 있는 셀을 선택합니다.

- (Type)등호(=), 첫 번째 셀 참조, 다른 등호 및 두 번째 셀 참조를 입력합니다 . 그런 다음 Enter 또는 Return 키를(Return) 눌러 결과를 확인하세요. 예를 들어, 다음 수식을 사용하여 셀 A1과 B1을 비교하겠습니다.
=A1=B1

- 그런 다음 채우기 핸들을 사용하여 해당 수식을 복사하여 열의 나머지 셀에 붙여넣을 수 있습니다. 채우기 핸들을 아래로 끌어 셀을 채우거나 두 번 클릭하여 나머지 셀을 자동으로 채웁니다.

그러면 각 값 행에 대해 해당 열에
True 또는 False가(False) 표시됩니다 .
(Compare Columns)IF 함수를(IF Function) 사용하여 열 비교
값에 대해 간단한 True 또는 False를 표시하는 위의 방법이 마음에 들지만 다른 값을 표시하려는 경우 (False)IF 함수를 사용할(use the IF function) 수 있습니다 . 이를 통해 중복되고 고유한 값에 대해 표시하려는 텍스트를 입력할 수 있습니다.
위의 예와 마찬가지로 수식에서는 전체가 아닌 행당 값을 비교합니다.
수식의 구문은 IF(test, if_true, if_false)입니다.
- 테스트: 비교하려는 값을 입력합니다. 고유하거나 중복된 값을 찾으려면 등호가 있는 셀 참조를 사용합니다(아래 참조).
- If_true: 값이 일치하는 경우 표시할 텍스트 또는 값을 입력합니다. 이것을 따옴표 안에 넣으세요.
- If_false: 값이 일치하지 않을 경우 표시할 텍스트나 값을 입력합니다. 이것도 따옴표로 묶으세요.
비교하려는 처음 두 값이 포함된 행으로 이동하고 앞서 표시된 대로 오른쪽에 있는 셀을 선택합니다.
그런 다음 IF 함수와 해당 수식을 입력합니다. 여기서는 셀 A1과 B1을 비교하겠습니다. 동일하면 "동일"을 표시하고, 그렇지 않으면 "다름"을 표시합니다.
=IF(A1=B1,”같은”,”다른”)

결과를 받으면 앞에서 설명한 대로 채우기 핸들을 사용하여 열의 나머지 셀을 채워 나머지 결과를 볼 수 있습니다.

(Compare Columns)VLOOKUP 함수를(VLOOKUP Function) 사용하여 열 비교
Excel 에서 열을 비교하는 또 다른 방법은 VLOOKUP 함수를 사용하는(using the VLOOKUP function) 것입니다 . 수식을 사용하면 두 열에서 어떤 값이 동일한지 확인할 수 있습니다.
수식의 구문은 VLOOKUP (lookup_value, array, col_num, match)입니다.
- Lookup_value: 조회하려는 값입니다. 해당 행의 왼쪽에 있는 셀부터 시작한 다음 나머지 셀에 대한 수식을 아래로 복사합니다.
- 배열: 위의 값을 조회할 셀의 범위입니다.
- Col_num: 반환 값이 포함된 열 번호입니다.
- 일치: 대략적으로 일치하려면 1 또는 True를(True) 입력하고, 정확히 일치하려면
0 또는 False를 입력합니다.(False)
비교하려는 처음 두 값이 포함된 행으로 이동하고 앞서 표시된 대로 오른쪽에 있는 셀을 선택합니다.
그런 다음 VLOOKUP 함수와 해당 수식을 입력합니다. 여기서는 정확한 일치를 위해 첫 번째 열의 셀 A1부터 시작하겠습니다.
=VLOOKUP(A1,$B$1:$B$5,1,FALSE)

(Notice)상대 참조(B1:B5) 대신 절대 참조($B$1:$B$5)를 사용한다는 점에 유의하세요 . 이는 배열 인수에서 동일한 범위를 유지하면서 수식을 나머지 셀에 복사할 수 있도록 하기 위한 것입니다.
채우기 핸들을 선택하고 나머지 셀로 드래그하거나 두 번 클릭하여 채웁니다.

수식은 A열에도 나타나는 B열의 값에 대한 결과를 반환하는 것을 볼 수 있습니다. 그렇지 않은 값의 경우 #N/A 오류가 표시됩니다.

선택 사항: IFNA 기능 추가
일치하지 않는 데이터에 대해 display something other than #N/A 하려는 경우 IFNA 함수를 수식에 추가할 수 있습니다.
구문은 IFNA (값, if_na)입니다. 여기서 값은 #N/A를 확인하는 위치이고 if_na는 발견된 경우 표시할 항목입니다.
여기서는 다음 수식을 사용하여 #N/A 대신 별표를 표시합니다.
=IFNA( VLOOKUP (A1,$B$1:$B$5,1, FALSE ),”*”)

보시다시피 IFNA 수식 의 첫 번째 인수로 VLOOKUP 수식을 삽입하기만 하면 됩니다 . 그런 다음 끝에 따옴표로 묶인 별표인 두 번째 인수를 추가합니다. 원하는 경우 따옴표 안에 공백이나 기타 문자를 삽입할 수도 있습니다.

내장된 기능이나 Excel 수식을 사용하여 다양한 방법으로 스프레드시트 데이터를 비교할 수 있습니다. 데이터 분석이든 단순히 일치하는 값을 찾는 것이든 (Whether)Excel 에서 이러한 방법 중 하나 또는 모두를 사용할 수 있습니다 .
How to Compare Two Columns in Microsoft Excel
When you want to compare values in different columns in Microsoft Excel, you can use more than just your eyeballs. You can highlight unique or duplicate values, display True or False for matches, or see which exact values appear in both columns.
We’ll show you how to compare two columns in Excel using five different methods. This lets you choose the one that best fits your needs and the data in your Excel worksheet.
Highlight Unique or Duplicate Values With Conditional Formatting
If you want to spot the duplicates or the unique values in your columns, you can set up a conditional formatting rule. Once you see the values highlighted, you can take whatever action you need.
Using this method, the rule compares the values in the columns overall, not per row.
- Select the columns you want to compare. Then, go to the Home tab, open the Conditional Formatting drop-down menu, and choose New Rule.

- Pick Format only unique or duplicate values at the top of the New Formatting Rule box.
- In the Format all drop-down box, choose either unique or duplicate, depending on which you prefer to highlight.

- Select the Format button and use the tabs to choose the formatting style you want. For instance, you can use the Font tab to pick a color for the text or the Fill tab to pick a color for the cells. Select OK.

- You’ll then see a preview of how your unique or duplicate values will appear. Select OK to apply the rule.

When you see the values highlighted, you can take action on them as you please. In this example, we’ve filled the cells with duplicate values yellow.

Compare Columns Using Go To Special
If you want to see the differences in your columns by row, you can use the Go To Special feature. This temporarily highlights the unique values so that you can do what you need.
Remember, using this method, the feature compares the values per row, not overall.
- Select the columns or cells in the columns you want to compare. Go to the Home tab, open the Find & Select drop-down menu, and choose Go To Special.

- In the dialog box that appears, pick Row differences and select OK.

- You’ll then see cells in the rows selected in the second column that are different from the first.

You can take action immediately if you only have a few differences. If you have many, you can keep the cells selected and choose a Fill Color on the Home tab to permanently highlight the cells. This gives you more time to do what you need.

Compare Columns Using True or False
Maybe you prefer to find matches and differences in your dataset without font or cell formatting. You can use a simple formula without a function to display True for values that are the same or False for those that are not.
Using this method, the formula compares the values per row, not overall.
- Go to the row containing the first two values you want to compare and select the cell to the right.

- Type an equal sign (=), the first cell reference, another equal sign, and the second cell reference. Then, press Enter or Return to see the result. As an example, we’ll compare cells A1 and B1 using the following formula:
=A1=B1

- You can then use the fill handle to copy and paste that formula to the remaining cells in the columns. Either drag the fill handle downward to fill the cells or double-click it to automatically fill the rest of the cells.

You’ll then have a True or False in that column for each row of values.
Compare Columns Using the IF Function
If you like the above method for showing a simple True or False for your values, but prefer to display something different, you can use the IF function. With it, you can enter the text you want to show for duplicate and unique values.
Like the above example, the formula compares the values per row, not overall.
The syntax for the formula is IF(test, if_true, if_false).
- Test: Enter the values you want to compare. For finding unique or duplicate values, you’ll use the cell references with an equal sign between them (shown below).
- If_true: Enter the text or value to display if the values match. Place this within quotation marks.
- If_false: Enter the text or value to display if the values don’t match. Place this in quotes as well.
Go to the row containing the first two values you want to compare and select the cell to the right as shown earlier.
Then, enter the IF function and its formula. Here, we’ll compare cells A1 and B1. If they are the same, we’ll display “Same” and if they’re not, we’ll display “Different.”
=IF(A1=B1,”Same”,”Different”)

Once you receive the result, you can use the fill handle as described earlier to fill the remaining cells in the column to see the rest of the results.

Compare Columns Using the VLOOKUP Function
One more way to compare columns in Excel is using the VLOOKUP function. With its formula, you can see which values are the same in both columns.
The syntax for the formula is VLOOKUP(lookup_value, array, col_num, match).
- Lookup_value: The value you want to look up. You’ll start with the cell on the left of that row and then copy the formula down for the remaining cells.
- Array: The range of cells to look up the above value.
- Col_num: The column number that contains the return value.
- Match: Enter 1 or True for an approximate match or 0 or False for an exact match.
Go to the row containing the first two values you want to compare and select the cell to the right as shown earlier.
Then, enter the VLOOKUP function and its formula. Here, we’ll start with cell A1 in the first column for an exact match.
=VLOOKUP(A1,$B$1:$B$5,1,FALSE)

Notice that we use absolute references ($B$1:$B$5) rather than relative references (B1:B5). This is so we can copy the formula down to the remaining cells while keeping the same range in the array argument.
Select the fill handle and drag to the remaining cells or double-click to fill them.

You can see that the formula returns results for those values in column B that also appear in column A. For those values that do not, you’ll see the #N/A error.

Optional: Add the IFNA Function
If you prefer to display something other than #N/A for non-matching data, you can add the IFNA function to the formula.
The syntax is IFNA(value, if_na) where the value is where you’re checking for the #N/A and if_na is what to display if it’s found.
Here, we’ll display an asterisk instead of #N/A using this formula:
=IFNA(VLOOKUP(A1,$B$1:$B$5,1,FALSE),”*”)

As you can see, we simply insert the VLOOKUP formula as the first argument for the IFNA formula. Then we add the second argument, which is the asterisk in quotes at the end. You can also insert a space or other character within quotes if you prefer.

Using built-in features or Excel formulas, you can compare spreadsheet data in a variety of ways. Whether for data analysis or simply spotting matching values, you can use one or all of these methods in Excel.