고유 값 목록 만들기: Excel과 Google Sheets

Google Sheets에서는 UNIQUE가 처음 나온 순서대로 고유 값을 넘깁니다. 테스트 목록은 SKU-103, SKU-101, SKU-103, SKU-110, sku-103, 빈 칸, 그리고 SKU-101 하나 더입니다. UNIQUE는 SKU-103, SKU-101, SKU-110, sku-103, 그리고 빈 항목을 반환했습니다. 대소문자가 다른 sku-103과 SKU-103은 따로 남았습니다.

목차

빠른 답변

Google Sheets에서는 UNIQUE가 처음 나온 순서대로 고유 값을 넘깁니다. 테스트 목록은 SKU-103, SKU-101, SKU-103, SKU-110, sku-103, 빈 칸, 그리고 SKU-101 하나 더입니다. UNIQUE는 SKU-103, SKU-101, SKU-110, sku-103, 그리고 빈 항목을 반환했습니다. 대소문자가 다른 sku-103과 SKU-103은 따로 남았습니다.

=UNIQUE(A2:A8)
=UNIQUE(A2:A8,FALSE,TRUE)
=COUNTUNIQUE(A2:A8)
=COUNTA(UNIQUE(A2:A8))

확인 사항

세 번째 인수가 TRUE이면 한 번만 나온 값만 남으며, 이번에는 SKU-110과 sku-103입니다. 두 번 나온 SKU-103과 SKU-101은 빠집니다. COUNTUNIQUE는 빈 칸을 제외한 4이고, COUNTA(UNIQUE(...))는 5입니다. 넘긴 결과에 빈 항목이 들어 있기 때문입니다.

주의점 및 호환성

COUNTUNIQUE는 Sheets 함수입니다. Microsoft 문서에 따르면 최신 Excel에는 UNIQUE가 있지만, 이번엔 데스크톱 Excel에서 다시 시험하지 않았습니다. UNIQUE는 아래쪽에 빈 칸이 있어야 넘길 수 있습니다.

영어 상세 예제, 수식 및 작성자 메모

Which versions this applies to

The results below come from Google Sheets on November 12, 2026. Microsoft documents UNIQUE for Excel 365 / Excel 2021. It is not in Excel 2016 or 2019. COUNTUNIQUE is a Google Sheets function; I am not quoting an Excel equivalent from this test. I did not re-run this list in desktop Excel today.

The list I used

A2:A8 held: SKU-103, SKU-101, SKU-103, SKU-110, sku-103, a blank cell, and SKU-101 again.

=UNIQUE(A2:A8)
=UNIQUE(A2:A8,FALSE,TRUE)
=COUNTUNIQUE(A2:A8)
=COUNTA(UNIQUE(A2:A8))

UNIQUE spilled SKU-103, SKU-101, SKU-110, sku-103, then a blank cell. The first occurrence of each value is the one that is kept, in that order. sku-103 was not merged into SKU-103. That is the opposite of COUNTIF and XLOOKUP, which ignored case in Case-Sensitive Lookup.

The third argument TRUE means “exactly once”: UNIQUE(A2:A8,FALSE,TRUE) spilled only SKU-110 and sku-103. SKU-103 and SKU-101 appear twice in the source, so they dropped out. The second argument FALSE means “by row,” which is the default I would pass explicitly if I also need the third argument.

COUNTUNIQUE and a blank cell

COUNTUNIQUE(A2:A8) returned 4. COUNTA(UNIQUE(A2:A8)) returned 5. The unique spill includes the blank as an extra item; COUNTUNIQUE did not count that blank, and COUNTA did, because a zero-length entry is not the same as an omitted cell for COUNTA. If you want a count of non-blank distinct codes, COUNTUNIQUE matched the four SKU strings in this file. If you need to know that a blank made it into the unique list, look at the spill, or compare the two counts.

Excel and Google Sheets differences

Current Excel has UNIQUE with the same by-column / exactly-once arguments, according to Microsoft. I did not re-test those arguments in Excel today. COUNTUNIQUE is the Sheets function I actually ran; I would not invent an Excel synonym for it here. Highlighting duplicates, rather than listing the unique set, is Highlight Duplicates Across Two Columns.

Common mistakes

  • Expecting UNIQUE to treat SKU-103 and sku-103 as one value. It kept both.
  • Comparing COUNTUNIQUE with COUNTA(UNIQUE(...)) and assuming they must match. They were 4 and 5 because of the blank.
  • Using UNIQUE(...,TRUE) and thinking the first argument flip means “exactly once.” The “exactly once” switch is the third argument.
  • Leaving values in the spill area. UNIQUE needs empty cells below the formula, the same way SPLIT needs empty cells to the right.

FAQ

How do I list unique values in Google Sheets?

=UNIQUE(A2:A8) spilled the distinct SKUs in first-seen order, and kept sku-103 separate from SKU-103.

How do I list values that appear only once?

=UNIQUE(A2:A8,FALSE,TRUE) spilled SKU-110 and sku-103 from this list.

Why is COUNTUNIQUE different from COUNTA of UNIQUE?

The unique spill included a blank from the source range. COUNTUNIQUE was 4; COUNTA(UNIQUE(A2:A8)) was 5.

Is UNIQUE case-sensitive?

In this file, yes: SKU-103 and sku-103 both appeared in the spill.

Will UNIQUE work in Excel 2016?

Microsoft does not list UNIQUE for Excel 2016 or 2019. I did not build an older-Excel workaround as part of this test.

Live-test findings

Google Sheets, November 12, 2026. Source: SKU-103, SKU-101, SKU-103, SKU-110, sku-103, blank, SKU-101. UNIQUE spilled SKU-103, SKU-101, SKU-110, sku-103, and a blank. UNIQUE(...,FALSE,TRUE) spilled SKU-110, sku-103. COUNTUNIQUE was 4. COUNTA(UNIQUE(...)) was 5.

Sources

Oscar

스프레드시트 수식과 오류 해결을 소개합니다. 검증 환경과 미확인 사항은 각 글을 참고하세요.

Tested in Google Sheets, November 12, 2026. Excel version notes follow Microsoft documentation and were not re-tested in a desktop Excel workbook on this date..

다음 글: 데이터 정리 및 입력 두 문자 사이의 텍스트 추출하기: Excel과 Google Sheets