मुख्य सामग्री पर जाएं

एक्सेल में एकाधिक कॉलम से अद्वितीय मान कैसे निकालें?

लेखक: ज़ियाओयांग अंतिम संशोधित: 2024-03-15

मान लीजिए कि आपके पास एकाधिक मानों वाले कई कॉलम हैं, तो कुछ मान एक ही कॉलम या अलग-अलग कॉलम में दोहराए जाते हैं। और अब आप उन मानों को ढूंढना चाहते हैं जो किसी भी कॉलम में केवल एक बार मौजूद हैं। क्या एक्सेल में एकाधिक कॉलम से अद्वितीय मान निकालने के लिए आपके पास कोई त्वरित तरकीबें हैं?


सूत्रों के साथ एकाधिक स्तंभों से अद्वितीय मान निकालें

यह अनुभाग दो सूत्रों को कवर करेगा: एक सभी एक्सेल संस्करणों के लिए उपयुक्त सरणी सूत्र का उपयोग करना, और दूसरा एक्सेल 365 के लिए विशेष रूप से गतिशील सरणी सूत्र का उपयोग करना।

सभी एक्सेल संस्करणों के लिए ऐरे फॉर्मूला के साथ एकाधिक कॉलम से अद्वितीय मान निकालें

एक्सेल के किसी भी संस्करण वाले उपयोगकर्ताओं के लिए, सरणी सूत्र कई कॉलमों में अद्वितीय मान निकालने के लिए एक शक्तिशाली उपकरण हो सकते हैं। यहां बताया गया है कि आप यह कैसे कर सकते हैं:

1. अपने मूल्यों को सीमा में मानकर ए 2: सी 9, कृपया सेल E2 में निम्नलिखित सूत्र दर्ज करें:

=INDIRECT(TEXT(MIN(IF(($A$2:$C$9<>"")*(COUNTIF($E$1:E1,$A$2:$C$9)=0),ROW($2:$9)*100+COLUMN($A:$C),7^8)),"R0C00"),)&""
नोट: उपरोक्त सूत्र में, ए 2: सी 9 उन कक्षों की श्रेणी को इंगित करता है जिनसे आप अद्वितीय मान निकालना चाहते हैं, E1: E1 यह उस कॉलम का पहला सेल है जिसमें आप परिणाम डालना चाहते हैं, $ 2: $ 9 पंक्तियों के सामने वे सेल हैं जिनका आप उपयोग करना चाहते हैं, और $ए:$सी इंगित करता है कि कॉलम में वे सेल हैं जिनका आप उपयोग करना चाहते हैं। कृपया उन्हें अपने में बदलें.

2। फिर दबायें शिफ्ट + Ctrl + एंटर कुंजियाँ एक साथ, और फिर रिक्त कक्ष दिखाई देने तक अद्वितीय मान निकालने के लिए भरण हैंडल को खींचें। स्क्रीनशॉट देखें:

इस सूत्र की व्याख्या:
  1. $ए$2:$सी$9: यह जांचे जाने वाले डेटा रेंज को निर्दिष्ट करता है, जो A2 से C9 तक की कोशिकाएं हैं।
  2. IF(($A$2:$C$9<>"")*(COUNTIF($E$1:E1,$A$2:$C$9)=0), ROW($2:$9)*100+COLUMN($A:$C), 7^8):
    • $A$2:$C$9<>"" जाँचता है कि श्रेणी में कोशिकाएँ खाली तो नहीं हैं।
    • COUNTIF($E$1:E1,$A$2:$C$9)=0 यह निर्धारित करता है कि क्या इन कोशिकाओं के मान अभी तक E1 से E1 तक की कोशिकाओं की श्रेणी में सूचीबद्ध नहीं किए गए हैं।
    • यदि दोनों शर्तें पूरी होती हैं (यानी, मान खाली नहीं है और अभी तक कॉलम ई में सूचीबद्ध नहीं है), IF फ़ंक्शन अपनी पंक्ति और कॉलम के आधार पर एक अद्वितीय संख्या की गणना करता है (ROW($2:$9)*100+COLUMN($A: $सी)).
    • यदि शर्तें पूरी नहीं होती हैं, तो फ़ंक्शन एक बड़ी संख्या (7^8) लौटाता है, जो प्लेसहोल्डर के रूप में कार्य करता है।
  3. न्यूनतम(...): अगले अद्वितीय मान के स्थान के अनुरूप, उपरोक्त IF फ़ंक्शन द्वारा लौटाई गई सबसे छोटी संख्या ढूँढता है।
  4. पाठ(...,"R0C00"): इस न्यूनतम संख्या को R1C1 शैली पते में परिवर्तित करता है। प्रारूप कोड R0C00 संख्या के एक्सेल सेल संदर्भ प्रारूप में रूपांतरण को इंगित करता है।
  5. अप्रत्यक्ष(...): पिछले चरण में उत्पन्न R1C1 शैली पते को सामान्य A1 शैली सेल संदर्भ में परिवर्तित करने के लिए अप्रत्यक्ष फ़ंक्शन का उपयोग करता है। अप्रत्यक्ष फ़ंक्शन टेक्स्ट स्ट्रिंग की सामग्री के आधार पर सेल संदर्भ की अनुमति देता है।
  6. &"": सूत्र के अंत में &"" जोड़ने से यह सुनिश्चित होता है कि अंतिम आउटपुट को टेक्स्ट के रूप में माना जाएगा, इसलिए सम संख्याओं को टेक्स्ट के रूप में प्रदर्शित किया जाएगा।
 
Excel 365 के फ़ॉर्मूले के साथ एकाधिक स्तंभों से अद्वितीय मान निकालें

Excel 365 गतिशील सरणियों का समर्थन करता है, जिससे एकाधिक स्तंभों से अद्वितीय मान निकालना बहुत आसान हो जाता है:

कृपया निम्नलिखित सूत्र को एक रिक्त कक्ष में दर्ज करें या कॉपी करें जहां आप परिणाम डालना चाहते हैं, और फिर क्लिक करें दर्ज सभी अद्वितीय मान एक साथ प्राप्त करने की कुंजी। स्क्रीनशॉट देखें:

=UNIQUE(TOCOL(A2:C9,1))


Kutools AI Aide के साथ अनेक स्तंभों से अद्वितीय मान निकालें

की शक्ति को उजागर करें कुटूल्स एआई सहयोगी एक्सेल में एकाधिक कॉलम से अद्वितीय मानों को निर्बाध रूप से निकालने के लिए। बस कुछ ही क्लिक के साथ, यह बुद्धिमान उपकरण आपके डेटा को छानता है, किसी भी चयनित सीमा में अद्वितीय प्रविष्टियों की पहचान करता है और सूचीबद्ध करता है। जटिल फ़ॉर्मूले या वीबीए कोड की परेशानी को भूल जाइए; की दक्षता को अपनाइए कुटूल्स एआई सहयोगी और अपने एक्सेल वर्कफ़्लो को अधिक उत्पादक और त्रुटि-मुक्त अनुभव में बदलें।

नोट: इसका उपयोग करने के लिए कुटूल्स एआई सहयोगी of एक्सेल के लिए कुटूल, कृपया एक्सेल के लिए कुटूल डाउनलोड और इंस्टॉल करें पहले।

एक्सेल के लिए कुटूल इंस्टॉल करने के बाद कृपया क्लिक करें कुटूल्स एआई > ऐ सहयोगी को खोलने के लिए कुटूल्स एआई सहयोगी फलक:

  1. चैट बॉक्स में अपनी आवश्यकता टाइप करें और क्लिक करें भेजें बटन या प्रेस दर्ज प्रश्न भेजने की कुंजी;
    "रिक्त कक्षों को अनदेखा करते हुए, श्रेणी A2:C9 से अद्वितीय मान निकालें, और परिणामों को E2 से शुरू करें:"
  2. विश्लेषण करने के बाद क्लिक करें निष्पादित करना चलाने के लिए बटन. कुटूल्स एआई सहयोगी एआई का उपयोग करके आपके अनुरोध को संसाधित करेगा और परिणाम सीधे एक्सेल में निर्दिष्ट सेल में लौटाएगा।


पिवट टेबल के साथ एकाधिक कॉलम से अद्वितीय मान निकालें

यदि आप पिवट टेबल से परिचित हैं, तो आप निम्नलिखित चरणों के साथ कई कॉलमों से अद्वितीय मान आसानी से निकाल सकते हैं:

1. सबसे पहले, कृपया अपने डेटा के बाईं ओर एक नया रिक्त कॉलम डालें, इस उदाहरण में, मैं मूल डेटा के बगल में कॉलम ए डालूंगा।

2. अपने डेटा में एक सेल पर क्लिक करें और दबाएँ Alt + D कुंजियाँ, फिर दबाएँ P खोलने के लिए तुरंत कुंजी पिवट टेबल और पिवट चार्ट विजार्ड, चुनें एकाधिक समेकन श्रेणियाँ विज़ार्ड चरण 1 में, स्क्रीनशॉट देखें:

3। तब दबायें अगला बटन, जांचें मेरे लिए एक पेज फ़ील्ड बनाएं विज़ार्ड चरण 2 में विकल्प, स्क्रीनशॉट देखें:

4. क्लिक करते जाइये अगला बटन, डेटा श्रेणी का चयन करने के लिए क्लिक करें जिसमें कक्षों का बायां नया कॉलम शामिल है, फिर क्लिक करें डेटा श्रेणी को जोड़ने के लिए बटन सभी पर्वतमाला सूची बॉक्स, स्क्रीनशॉट देखें:

5. डेटा रेंज का चयन करने के बाद जारी रखें पर क्लिक करें अगला, विज़ार्ड चरण 3 में, अपनी पसंद के अनुसार चुनें कि आप PivotTable रिपोर्ट कहाँ रखना चाहते हैं।

6. अंत में, क्लिक करें अंत विज़ार्ड को पूरा करने के लिए, और वर्तमान वर्कशीट में एक पिवट टेबल बनाई गई है, फिर सभी फ़ील्ड को अनचेक करें रिपोर्ट में जोड़ने के लिए फ़ील्ड चुनें अनुभाग, स्क्रीनशॉट देखें:

7. फिर फ़ील्ड की जाँच करें वैल्यू या मान को खींचें पंक्तियाँ लेबल, अब आपको एकाधिक कॉलम से अद्वितीय मान इस प्रकार मिलेंगे:


VBA कोड के साथ एकाधिक स्तंभों से अद्वितीय मान निकालें

निम्नलिखित वीबीए कोड के साथ, आप एकाधिक कॉलम से अद्वितीय मान भी निकाल सकते हैं।

1. दबाए रखें ALT + F11 कुंजियाँ, और यह खुल जाती है एप्लीकेशन विंडो के लिए माइक्रोसॉफ्ट विज़ुअल बेसिक.

2। क्लिक करें सम्मिलित करें > मॉड्यूल, और मॉड्यूल विंडो में निम्नलिखित कोड पेस्ट करें।

वीबीए: एकाधिक स्तंभों से अद्वितीय मान निकालें

Sub Uniquedata()
'Updateby Extendoffice
Dim rng As Range
Dim InputRng As Range, OutRng As Range
Set dt = CreateObject("Scripting.Dictionary")
xTitleId = "KutoolsforExcel"
Set InputRng = Application.Selection
Set InputRng = Application.InputBox("Range :", xTitleId, InputRng.Address, Type:=8)
Set OutRng = Application.InputBox("Out put to (single cell):", xTitleId, Type:=8)
For Each rng In InputRng
    If rng.Value <> "" Then
        dt(rng.Value) = ""
    End If
Next
OutRng.Range("A1").Resize(dt.Count) = Application.WorksheetFunction.Transpose(dt.Keys)
End Sub

3। फिर दबायें F5 इस कोड को चलाने के लिए, और एक प्रॉम्प्ट बॉक्स आपको यह याद दिलाने के लिए पॉप अप होगा कि आप उस डेटा रेंज का चयन करें जिसका आप उपयोग करना चाहते हैं। स्क्रीनशॉट देखें:

4। और फिर क्लिक करें OK, एक और प्रॉम्प्ट बॉक्स दिखाई देगा जिससे आप परिणाम डालने के लिए स्थान चुन सकेंगे, स्क्रीनशॉट देखें:

5. क्लिक करें OK इस संवाद को बंद करने के लिए, और सभी अद्वितीय मान एक ही बार में निकाले गए हैं।


अधिक संबंधित लेख:

  • किसी सूची से अद्वितीय और विशिष्ट मानों की संख्या गिनें
  • मान लीजिए, आपके पास कुछ डुप्लिकेट आइटमों के साथ मानों की एक लंबी सूची है, अब, आप अद्वितीय मानों की संख्या की गणना करना चाहते हैं (वे मान जो सूची में केवल एक बार दिखाई देते हैं) या विशिष्ट मान (सूची में सभी अलग-अलग मान, इसका मतलब अद्वितीय है) मान +पहला डुप्लिकेट मान) एक कॉलम में जैसा कि बाएं स्क्रीनशॉट में दिखाया गया है। इस लेख में, मैं एक्सेल में इस काम से निपटने के तरीके के बारे में बात करूंगा।
  • एक्सेल में मानदंड के आधार पर अद्वितीय मान निकालें
  • मान लीजिए, आपके पास निम्नलिखित डेटा रेंज है जिसमें आप नीचे दिखाए गए स्क्रीनशॉट के अनुसार परिणाम प्राप्त करने के लिए कॉलम ए के विशिष्ट मानदंड के आधार पर केवल कॉलम बी के अद्वितीय नामों को सूचीबद्ध करना चाहते हैं। आप एक्सेल में इस कार्य को जल्दी और आसानी से कैसे निपटा सकते हैं?
  • एक्सेल में मानदंड के आधार पर अद्वितीय मानों का योग
  • उदाहरण के लिए, मेरे पास डेटा की एक श्रृंखला है जिसमें नाम और ऑर्डर कॉलम शामिल हैं, अब, नाम कॉलम के आधार पर ऑर्डर कॉलम में केवल अद्वितीय मानों को जोड़ने के लिए जैसा कि निम्नलिखित स्क्रीनशॉट में दिखाया गया है। एक्सेल में इस कार्य को जल्दी और आसानी से कैसे हल करें?

सर्वोत्तम कार्यालय उत्पादकता उपकरण

🤖 कुटूल्स एआई सहयोगी: निम्न के आधार पर डेटा विश्लेषण में क्रांति लाएं: बुद्धिमान निष्पादन   |  कोड जनरेट करें  |  कस्टम फ़ॉर्मूले बनाएं  |  डेटा का विश्लेषण करें और चार्ट बनाएं  |  कुटूल फ़ंक्शंस का आह्वान करें...
लोकप्रिय सुविधाएँ: डुप्लिकेट ढूंढें, हाइलाइट करें या पहचानें   |  रिक्त पंक्तियाँ हटाएँ   |  डेटा खोए बिना कॉलम या सेल को संयोजित करें   |   फॉर्मूला के बिना गोल ...
सुपर लुकअप: एकाधिक मानदंड VLookup    मल्टीपल वैल्यू वीलुकअप  |   अनेक शीटों में VLookup   |   फजी लुकअप ....
उन्नत ड्रॉप-डाउन सूची: शीघ्रता से ड्रॉप डाउन सूची बनाएं   |  आश्रित ड्रॉप डाउन सूची   |  बहु-चयन ड्रॉप डाउन सूची ....
स्तम्भ प्रबंधक: कॉलमों की एक विशिष्ट संख्या जोड़ें  |  कॉलम ले जाएँ  |  छिपे हुए कॉलम की दृश्यता स्थिति टॉगल करें  |  रेंज और कॉलम की तुलना करें ...
फीचर्ड फीचर्स: ग्रिड फोकस   |  डिजाइन देखें   |   बड़ा फॉर्मूला बार    कार्यपुस्तिका एवं शीट प्रबंधक   |  संसाधन लाइब्रेरी (ऑटो टेक्स्ट)   |  खजूर बीनने वाला   |  कार्यपत्रकों को संयोजित करें   |  एन्क्रिप्ट/डिक्रिप्ट सेल    सूची के अनुसार ईमेल भेजें   |  सुपर फ़िल्टर   |   विशेष फ़िल्टर (फ़िल्टर बोल्ड/इटैलिक/स्ट्राइकथ्रू...) ...
शीर्ष 15 टूलसेट12 टेक्स्ट टूल्स (पाठ जोड़ें, अक्षर हटाएँ, ...)   |   50 + चार्ट प्रकार (गैन्ट चार्ट, ...)   |   40+ प्रैक्टिकल सूत्र (जन्मदिन के आधार पर आयु की गणना करें, ...)   |   19 निवेशन टूल्स (QR कोड डालें, पथ से चित्र सम्मिलित करें, ...)   |   12 रूपांतरण टूल्स (शब्दों को संख्याएँ, मुद्रा रूपांतरण, ...)   |   7 विलय और विभाजन टूल्स (उन्नत संयोजन पंक्तियाँ, विभाजन कोशिकाओं, ...)   |   ... और अधिक

एक्सेल के लिए कुटूल के साथ अपने एक्सेल कौशल को सुपरचार्ज करें, और पहले जैसी दक्षता का अनुभव करें। एक्सेल के लिए कुटूल उत्पादकता बढ़ाने और समय बचाने के लिए 300 से अधिक उन्नत सुविधाएँ प्रदान करता है।  वह सुविधा प्राप्त करने के लिए यहां क्लिक करें जिसकी आपको सबसे अधिक आवश्यकता है...

Description


ऑफिस टैब ऑफिस में टैब्ड इंटरफ़ेस लाता है, और आपके काम को बहुत आसान बनाता है

  • Word, Excel, PowerPoint में टैब्ड संपादन और रीडिंग सक्षम करें, प्रकाशक, एक्सेस, विसियो और प्रोजेक्ट।
  • नई विंडो के बजाय एक ही विंडो के नए टैब में एकाधिक दस्तावेज़ खोलें और बनाएं।
  • आपकी उत्पादकता 50% बढ़ जाती है, और आपके लिए हर दिन सैकड़ों माउस क्लिक कम हो जाते हैं!
Comments (31)
Rated 5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
Thank you for this solution, however what if the columns are in separate excel sheet? or is in separate columns instead of a table?
This comment was minimized by the moderator on the site
Hello, Jon,
The methods in this article ar only works well for a range of data, if your data in separate columns, you should copy and paste them into one range first, and then apply the formula or VBA code.
Thank you!
This comment was minimized by the moderator on the site
Thank you for this great article.

For people who are using the array formular in non-English Excel there must be taken special care of the text format string: in your example: "R0C00".
For German this would translate to "Z0S00". However, "S" is a special character refering to seconds for time formating. This character needs to be escaped and therefore the correct format string for German Excel is "Z0\S00".

I hope this helps someone in the future :-)
This comment was minimized by the moderator on the site
Hello, Michael H.
Thanks for your kindly explanation.
Hope this can help others in the future.😄
This comment was minimized by the moderator on the site
Thank you for this great article.

For people who are using the array formular in non-English Excel there must be taken special care of the text format string: in your example: "R0C00".
For German this would translate to "Z0S00". However, "S" is a special character refering to seconds for time formating. This character needs to be escaped and therefore the correct format string for German Excel is "Z0\S00".

I hope this helps someone in the future :-)
This comment was minimized by the moderator on the site
Hello Sir! The VBA worked wonders, thank you very much for that! I was wondering, If I change the original data, is it possible to refresh the column with the unique values automatically?
Rated 5 out of 5
This comment was minimized by the moderator on the site
Hello Ioannis,

Glad to help. After you change the original data, the VBA can not refresh the result automatically. And the easiest way I can think of is to press Ctrl + Alt + F9 to refresh all results in worksheets in all open workbooks. Have a nice day.

Sincerely,
Mandy
This comment was minimized by the moderator on the site
The array formula at the top is working great when used with data in the same sheet, however when I try to use it to reference the same exact data from another sheet the formula returns nothing. I'm unable to figure out why. Is there a limitation with array functions that prevents you from referencing ranges in a different sheet?

Thanks for any insight you can provide.
This comment was minimized by the moderator on the site
Hello Erin,

Glad to help. The INDIRECT function in this formula is more complicated to use when referencing data in other worksheets. It is not recommended to use this feature when referencing ranges in different worksheets.

For example: Now the data is in Sheet1, I want to reference the content of cell C2 of Sheet1 in Sheet2. First, in any two cells in Sheet2, such as D1 and D2, enter Sheet1 and C2, respectively. At this point, enter the formula in the empty cell of Sheet2:
=INDIRECT("'"&D1&"'!"&D2), then the content of cell C2 in Sheet1 can be returned.

As you can see, it make things way more complex. Hope my explanation can help. Have a nice day.

Sincerely,
Mandy
This comment was minimized by the moderator on the site
Czy to żart?
This comment was minimized by the moderator on the site
can we create uniqdata function instead of macro?
This comment was minimized by the moderator on the site
Hi, İlhan,If you like a User Defined Function to create a formula for solving this problem, the below code may help you:After inserting the code, select a list of cells where you want to put the results. Then type this formula:=Uniques(A1:C4)  in the formula bar.Press Ctrl+Shift+Enter keys together. 


Function Uniques(ByVal inputRange As Range)
Dim inputArray As Variant
Dim myColl As New Collection
Dim xVal As Variant
Dim outArray() As Variant
On Error Resume Next
With inputRange
inputArray = Application.Intersect(.Cells, .Parent.UsedRange).Value
End With
On Error GoTo 0
On Error Resume Next
For Each xVal In inputArray
myColl.*** Item:=xVal, Key:=(CStr(xVal) & TypeName(xVal))
Next xVal
myColl.Remove "String"
On Error GoTo 0
ReDim outArray(1 To Application.Max(myColl.Count, Application.Caller.Cells.Count))
For xVal = 1 To UBound(outArray)
outArray(xVal) = vbNullString
Next xVal
For xVal = 1 To Application.Min(myColl.Count, Application.Caller.Cells.Count)
outArray(xVal) = myColl(xVal)
Next xVal
If Application.Caller.Columns.Count = 1 Then
Uniques = Application.Transpose(outArray)
Else
Uniques = outArray
End If
End Function
This comment was minimized by the moderator on the site
Thanks for the code. I'm using the VBA code of this page. Is there a way to add a sorting code after the unique values are extracted so it sorts it automatically?
This comment was minimized by the moderator on the site
Regarding the formula version, could you explain in more detail what this portion is doing? *100+COLUMN($A:$C),7^8)),"R0C00") Specifically, what are the *100, 7^8, and "R0C000" doing? I'm understanding everything else, but I can't figure out what these are for.
This comment was minimized by the moderator on the site
Little late for my response here but...
ROW($2:$9)*100 - this is multiplying the row number *100, so if it's in row 5, now the number is 500
COLUMN($A:$C) - this gets added to the row*100 number, so if it's row 5 col 2, then the number is 502.
7^8)), - this (I think) is to have a max value for the min statement from earlier.
"R0C00") - this formats the text based on the number. In the example, we had 502 so this gives R5C02 (row 5, col 02).

If you have a lot of columns but not many rows, then you could change it to ROW($2:$9)*1000+COLUMN($A:$C),7^8)),"R0C000")
This comment was minimized by the moderator on the site
i've adjusted to my sheet but am only returning the first value in the defined array... what am i missing?
This comment was minimized by the moderator on the site
Hello, Cody,
The above formula works well in my worksheet, could you give a screenshot of your data problem here?
Thank you!
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