ไปยังเนื้อหาหลัก

วิธีนับค่าหรือตัวเลขที่ไม่ซ้ำกันในคอลัมน์ใน Excel

ผู้เขียน: Xiaoyang แก้ไขล่าสุด: 2020-12-11

สมมติว่าคุณมีรายการค่าในช่วงของแผ่นงานและตอนนี้คุณต้องการทราบว่ามีค่าที่ไม่ซ้ำกันกี่ค่า หากคุณระบุและนับทีละรายการจะเสียเวลามาก ดังนั้นที่นี่ฉันจะแนะนำเคล็ดลับง่ายๆในการจัดการกับปัญหานี้

นับจำนวนค่าที่ไม่ซ้ำกันด้วยสูตร

นับจำนวนค่าที่ไม่ซ้ำกันด้วยตัวกรองขั้นสูง

นับจำนวนค่าที่ไม่ซ้ำกันด้วย Kutools for Excel


นับจำนวนค่าที่ไม่ซ้ำกันด้วยสูตร

มีสูตรบางอย่างที่ช่วยให้คุณสามารถนับจำนวนค่าที่ไม่ซ้ำกันในช่วงได้อย่างรวดเร็ว ตัวอย่างเช่นหากข้อมูลของคุณเป็นตัวเลขคุณมีคอลัมน์ของตัวเลขในช่วง (A1: A10) ดูภาพหน้าจอ:

doc-count-unique-values1

คุณสามารถใช้สูตรต่อไปนี้โปรดทำตามนี้:

1. ใส่สูตรนี้ =SUMPRODUCT(1/COUNTIF(A1:A10,A1:A10)) ลงในเซลล์ว่าง

doc-count-unique-values1

2. จากนั้นกด เข้าสู่ คีย์และหมายเลขของค่าที่ไม่ซ้ำกันจะปรากฏขึ้น ดูภาพหน้าจอ:

doc-count-unique-values1

เคล็ดลับ: 1. นี่คือสูตรอื่น =SUM(IF(FREQUENCY(A1:A10, A1:A10)>0,1)) ยังช่วยคุณได้ โปรดสมัครใครก็ได้ตามใจชอบ ทั้งสองสูตรข้างต้นจะนับค่าที่ไม่ซ้ำกันรวมทั้งรายการที่ซ้ำกันครั้งแรกด้วย

2. หากมีช่วงของข้อความในแผ่นงานของคุณสูตรข้างต้นจะไม่ทำงานคุณควรใช้สูตรอาร์เรย์นี้: =SUM(IF(FREQUENCY(IF(LEN(A1:A10)>0,MATCH(A1:A10,A1:A10,0),""), IF(LEN(A1:A10)>0,MATCH(A1:A10,A1:A10,0),""))>0,1))

doc-count-unique-values1

หลังจากใส่สูตรแล้วอย่าลืมกด Shift + Ctrl + Enter คีย์และจำนวนค่าที่ไม่ซ้ำกันได้แสดงขึ้น

doc-count-unique-values1

หมายเหตุ:

  • 1. ช่วง A1: A10 ในสูตรข้างต้นเป็นตัวแปรคุณสามารถเปลี่ยนแปลงได้ตามที่คุณต้องการ
  • 2. สูตรนี้ยังนับค่าที่ไม่ซ้ำกันรวมทั้งรายการที่ซ้ำกันครั้งแรก
  • 3. สูตรนี้ทำงานในช่วงของข้อความและตัวเลขเช่นกัน

นับจำนวนค่าที่ไม่ซ้ำกันด้วยตัวกรองขั้นสูง

คุณยังสามารถใช้ตัวกรองขั้นสูงเพื่อแยกค่าที่ไม่ซ้ำกันจากคอลัมน์ของข้อมูลและวางลงในตำแหน่งใหม่ จากนั้นใช้ฟังก์ชัน ROWS เพื่อนับจำนวนค่าที่ไม่ซ้ำกันในช่วงใหม่ ขั้นตอนเฉพาะมีดังนี้:

1. คลิก ข้อมูล ใน Ribbon แล้วคลิก ระดับสูง คำสั่งดูภาพหน้าจอ:

doc-count-unique-values1

2. และใน ตัวกรองขั้นสูง กล่องโต้ตอบ:

doc-count-unique-values1
  • (1. ) เลือก คัดลอกไปยังตำแหน่งอื่น ภายใต้ การกระทำ;
  • (2. ) ใน ช่วงรายการ คลิกที่ doc-ปุ่ม1 ปุ่มเพื่อเลือกข้อมูลช่วงที่คุณต้องการใช้
  • (3. ) ใน คัดลอกไปที่ คลิกที่ doc-ปุ่ม1 ปุ่มเพื่อระบุเซลล์ที่คุณต้องการใส่ค่าเฉพาะที่กรองแล้วลงไป
  • (4. ) สุดท้ายให้ตรวจสอบ เฉพาะระเบียนเท่านั้น ตัวเลือก

3. หลังจากเสร็จสิ้นการตั้งค่าคลิก OKค่าที่ไม่ซ้ำกันได้รับการระบุไว้ในคอลัมน์ใหม่ดูภาพหน้าจอ:

doc-count-unique-values1

4. จากนั้นในเซลล์ว่างให้ป้อนสูตรสั้น ๆ = แถว (E1: E8)แล้วกด เข้าสู่ บนแป้นพิมพ์ และจำนวนของค่าที่ไม่ซ้ำกันจะปรากฏขึ้น

doc-count-unique-values9 -2 doc-count-unique-values10

นับจำนวนค่าที่ไม่ซ้ำกันด้วย Kutools for Excel

 ที่นี่ฉันจะแนะนำเครื่องมือที่มีประโยชน์ - Kutools สำหรับ Excelเดียวกันกับที่ เลือกเซลล์ซ้ำและไม่ซ้ำกัน คุณสามารถเลือกค่าที่ซ้ำกันหรือค่าที่ไม่ซ้ำกันได้อย่างรวดเร็วและนับจำนวนของค่าเหล่านั้น

Kutools สำหรับ Excel : ด้วย Add-in ของ Excel ที่มีประโยชน์มากกว่า 300 รายการทดลองใช้ฟรีโดยไม่มีข้อ จำกัด ใน 30 วัน

หลังจากการติดตั้ง Kutools สำหรับ Excelโปรดทำตามขั้นตอนต่อไปนี้:

1. เลือกช่วงข้อมูลที่คุณต้องการนับค่าเฉพาะ

2. จากนั้นคลิก Kutools > เลือก > เลือกเซลล์ซ้ำและไม่ซ้ำกันดูภาพหน้าจอ:

doc-count-unique-values11-11

3. ใน เลือกเซลล์ซ้ำและไม่ซ้ำกัน ให้เลือก ค่าเฉพาะเท่านั้น or ไม่ซ้ำกันทั้งหมด (รวมถึงรายการที่ซ้ำกันครั้งแรก) ตามที่คุณต้องการในขณะเดียวกันคุณยังสามารถเน้นค่าที่ไม่ซ้ำกันได้โดยการตรวจสอบ เติม backcolor or เติมสีตัวอักษร ภายใต้ การประมวลผล ส่วนดูภาพหน้าจอ:

doc-count-unique-values12-12

4. (1. ) ถ้าคุณเลือก ค่าเฉพาะเท่านั้นระบบจะนับและเลือกเฉพาะค่าที่ไม่ซ้ำกันพร้อมกัน ดูภาพหน้าจอ:

doc-count-unique-values13-13

(2. ) ถ้าคุณเลือก ไม่ซ้ำกันทั้งหมด (รวมถึงรายการที่ซ้ำกันครั้งแรก)ค่าที่ไม่ซ้ำกันทั้งหมดซึ่งรวมถึงรายการที่ซ้ำกันครั้งแรกจะถูกนับและเลือกตามภาพหน้าจอต่อไปนี้:

doc-count-unique-values14-14

คลิกเพื่อทราบข้อมูลเพิ่มเติมเกี่ยวกับคุณลักษณะ Select Duplicate & Unique Cells

ดาวน์โหลดและทดลองใช้ Kutools for Excel ฟรีทันที!


Demo: นับจำนวนค่าที่ไม่ซ้ำกันด้วย Kutools for Excel

Kutools สำหรับ Excel: ด้วย Add-in ของ Excel ที่มีประโยชน์มากกว่า 300 รายการให้ทดลองใช้ฟรีโดยไม่มีข้อ จำกัด ใน 30 วัน ดาวน์โหลดและทดลองใช้ฟรีทันที!


บทความที่เกี่ยวข้อง:

วิธีกรองหรือเลือกระเบียนเฉพาะจากช่วงที่เลือกใน Excel

สุดยอดเครื่องมือเพิ่มผลผลิตในสำนักงาน

🤖 Kutools AI ผู้ช่วย: ปฏิวัติการวิเคราะห์ข้อมูลโดยยึดตาม: การดำเนินการที่ชาญฉลาด   |  สร้างรหัส  |  สร้างสูตรที่กำหนดเอง  |  วิเคราะห์ข้อมูลและสร้างแผนภูมิ  |  เรียกใช้ฟังก์ชัน Kutools...
คุณสมบัติยอดนิยม: ค้นหา เน้น หรือระบุรายการที่ซ้ำกัน   |  ลบแถวว่าง   |  รวมคอลัมน์หรือเซลล์โดยไม่สูญเสียข้อมูล   |   รอบโดยไม่มีสูตร ...
การค้นหาขั้นสูง: VLookup หลายเกณฑ์    VLookup หลายค่า  |   VLookup ข้ามหลายแผ่น   |   การค้นหาที่ไม่ชัดเจน ....
รายการแบบเลื่อนลงขั้นสูง: สร้างรายการแบบหล่นลงอย่างรวดเร็ว   |  รายการแบบหล่นลงขึ้นอยู่กับ   |  เลือกหลายรายการแบบหล่นลง ....
ผู้จัดการคอลัมน์: เพิ่มจำนวนคอลัมน์เฉพาะ  |  ย้ายคอลัมน์  |  สลับสถานะการมองเห็นของคอลัมน์ที่ซ่อนอยู่  |  เปรียบเทียบช่วงและคอลัมน์ ...
คุณสมบัติเด่น: กริดโฟกัส   |  มุมมองการออกแบบ   |   บาร์สูตรใหญ่    สมุดงานและตัวจัดการชีต   |  ห้องสมุดทรัพยากร (ข้อความอัตโนมัติ)   |  เลือกวันที่   |  รวมแผ่นงาน   |  เข้ารหัส/ถอดรหัสเซลล์    ส่งอีเมลตามรายการ   |  ซุปเปอร์ฟิลเตอร์   |   ตัวกรองพิเศษ (กรองตัวหนา/ตัวเอียง/ขีดทับ...) ...
ชุดเครื่องมือ 15 อันดับแรก12 ข้อความ เครื่องมือ (เพิ่มข้อความ, ลบอักขระ, ... )   |   50 + แผนภูมิ ประเภท (แผนภูมิ Gantt, ... )   |   40+ ใช้งานได้จริง สูตร (คำนวณอายุตามวันเกิด, ... )   |   19 การแทรก เครื่องมือ (ใส่ QR Code, แทรกรูปภาพจากเส้นทาง, ... )   |   12 การแปลง เครื่องมือ (ตัวเลขเป็นคำ, การแปลงสกุลเงิน, ... )   |   7 ผสานและแยก เครื่องมือ (แถวรวมขั้นสูง, แยกเซลล์, ... )   |   ... และอื่น ๆ

เพิ่มพูนทักษะ Excel ของคุณด้วย Kutools สำหรับ Excel และสัมผัสประสิทธิภาพอย่างที่ไม่เคยมีมาก่อน Kutools สำหรับ Excel เสนอคุณสมบัติขั้นสูงมากกว่า 300 รายการเพื่อเพิ่มประสิทธิภาพและประหยัดเวลา  คลิกที่นี่เพื่อรับคุณสมบัติที่คุณต้องการมากที่สุด...

รายละเอียด


แท็บ Office นำอินเทอร์เฟซแบบแท็บมาที่ Office และทำให้งานของคุณง่ายขึ้นมาก

  • เปิดใช้งานการแก้ไขและอ่านแบบแท็บใน Word, Excel, PowerPoint, ผู้จัดพิมพ์, Access, Visio และโครงการ
  • เปิดและสร้างเอกสารหลายรายการในแท็บใหม่ของหน้าต่างเดียวกันแทนที่จะเป็นในหน้าต่างใหม่
  • เพิ่มประสิทธิภาพการทำงานของคุณ 50% และลดการคลิกเมาส์หลายร้อยครั้งให้คุณทุกวัน!
Comments (18)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
With the new UNIQUE function in Excel 365: COUNTA(UNIQUE(interval)).
This comment was minimized by the moderator on the site
tying to know the values of unique customer for different products, for ex: there are 100 customers, wanted to know out of those how many are unique customers who buy only those products. Likewise: total sales of products = 100 apple = 40 orange = 60 how to find out customers who have brought only oranges and apples?
This comment was minimized by the moderator on the site
in this formula, =SUM(IF(FREQUENCY(MATCH(B2:B10,B2:B10,0),MATCH(B2:B10,B2:B10,0))>0,1)) can i add another "if"? for example i want count the range of unique text in B2:B150 if C2:C150=1 ??? can i?
This comment was minimized by the moderator on the site
How would you seperate unique values in a cell? ie. #2,#2,#3 I only want the #2 to appear once?
This comment was minimized by the moderator on the site
no these formulas are not sufficient, in actual my problem is little bit big, there are lots of column in my sheet, with the name of store id and store name and months in three column respectively and there is repetition of store name in every month a no of time, i have to calculate the unique no of the store name with respect to month. please suggest me the exact formula accordingly.
This comment was minimized by the moderator on the site
Order Rep Status Product Order Value A1 John Close Apple $1 A1 John Close Pear $1.50 A2 John Open Orange $0.50 A3 John Close Grape $3.00 A2 John Open Apple $1 A4 John Close Orange $0.50 A5 Mary Close Apple $1 A6 Peter Close Grape $3.00 Appreciate your advice on this... I am trying to count the unique number of order # (first column), where the rep is John and the order status is closed. the result to achieve is 3 unique orders (A1, A3 and A4). But if i do a countifs function, it literally count the number of 'Close' where rep=John, and that comes back with 4. Is this possible to count unique values against multiple conditions of other columns?
This comment was minimized by the moderator on the site
Anyone know how to make the =SUM(IF(FREQUENCY(A1:A10, A1:A10)>0,1)) formula work to count the number of unique fields for a series of intervals? For example, I want to be able to find out the number of unique entries for each day. My data is structures as ID numbers in Column A, Dates in column B. The data is sorted by the date column. Any help would be very very much appreciated!
This comment was minimized by the moderator on the site
Your formula works a treat and allows me to see the number of unique clients that I have in total (i.e. from all my sales people combined). I am struggling however, to update the formula so that it would allow me to see the number of unique clients an individual sales person would have. Any ideas?
This comment was minimized by the moderator on the site
=SUMPRODUCT(1/COUNTIF(A1:A10,A1:A10))when you are selecting the range make sure that the cells should not be blank.
This comment was minimized by the moderator on the site
Hi, Thank you for your help regarding the duplicates but I'd like to modify your formula =SUM(IF(FREQUENCY(A2:A800, A2:A800)>0,1)) and add this condition (assuming that all the cells are numbers) to count only between 402 to 460 and it goes on to 502 to 560; 602 to 660 (1 formula per range) would it be possible? Thank you very much!
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations