Ana içeriğe atla

Excel'de birden çok karşılık gelen değeri nasıl görüntüleyebilir ve birleştirebilirim?

Hepimizin bildiği gibi VLOOKUP Excel'deki işlev, bir değeri aramamıza ve karşılık gelen verileri başka bir sütunda döndürmemize yardımcı olabilir, ancak genel olarak, birden çok eşleşen veri varsa yalnızca ilk göreli değeri alabilir. Bu yazıda, yalnızca bir hücrede veya dikey bir listede birden fazla karşılık gelen değeri nasıl vlookup ve birleştireceğimi anlatacağım.

Vlookup ve formülle birden çok eşleşen değeri dikey olarak döndür

Vlookup ve Kullanıcı Tanımlı İşlev ile bir hücrede birden çok eşleşen değeri birleştirin

Kutools for Excel ile bir hücrede birden çok eşleşen değeri Vlookup ve birleştirin


Diyelim ki, aşağıdaki veri aralığına sahip olduğumu varsayarsak, aşağıdaki ekran görüntüsünde gösterildiği gibi dikey olarak belirli bir değere dayalı tüm karşılık gelen değerleri elde etmek için bir dizi formülü uygulayabilirsiniz.

doc vlookup birleştirme 1

1. Şu formülü girin: =IF(COUNTIF($A$1:$A$16,$D$2)>=ROWS($1:1),INDEX($B$1:$B$16,SMALL(IF($A$1:$A$16=$D$2,ROW($1:$16)),ROW(1:1))),"") Sonucu yerleştirmek istediğiniz boş bir hücreye, örneğin E2'ye ve ardından Ctrl + Üst Karakter + Enter belirli bir kritere göre göreli değer tabanını elde etmek için tuşları bir araya getirin, ekran görüntüsüne bakın:

doc vlookup birleştirme 2

not: Yukarıdaki formülde:

A1: A16 aramak istediğiniz belirli değeri içeren sütun aralığıdır;

D2 bakmak istediğiniz belirli değeri gösterir;

B1: B16 karşılık gelen verileri döndürmek istediğiniz sütun aralığıdır;

$ 1: $ 16 aralık içindeki satır referansını gösterir.

2. Ardından E2 hücresini seçin ve boş hücreler elde edene kadar doldurma tutamacını hücrelere sürükleyin ve eşleşen tüm değerler aşağıdaki ekran görüntüsü gibi sütunda listelenir:

doc vlookup birleştirme 3


Göreli değerleri dikey olarak almak yerine, bazen eşleşen değerleri tek bir hücreye almak ve bunları belirli bir ayırıcıyla birleştirmek istersiniz. Bu durumda, aşağıdaki Kullanıcı Tanımlı İşlev size bir iyilik yapabilir.

1. basılı tutun ALT + F11 tuşlarını açmak için Uygulamalar için Microsoft Visual Basic pencere.

2. tıklayın Ekle > modülve aşağıdaki kodu modül Pencere.

VBA kodu: Vlookup ve bir hücrede birden çok eşleşen değeri birleştirin

Function CusVlookup(lookupval, lookuprange As Range, indexcol As Long)
'updateby Extendoffice
Dim x As Range
Dim result As String
result = ""
For Each x In lookuprange
    If x = lookupval Then
        result = result & " " & x.Offset(0, indexcol - 1)
    End If
Next x
CusVlookup = result
End Function

3. Ardından bu kodu kaydedip kapatın, çalışma sayfasına geri dönün ve şu formülü girin: = cusvlookup (D2, A1: B16,2) sonucu koymak istediğiniz boş bir hücreye girin ve Keşfet anahtar, belirli bir veriye dayalı karşılık gelen tüm değerler boşluk ayırıcı ile tek bir hücreye döndürüldü, ekran görüntüsüne bakın:

doc vlookup birleştirme 4

not: Yukarıdaki formülde: D2 aramak istediğiniz hücre değerlerini gösterir, A1: B16 verileri almak istediğiniz veri aralığıdır, sayı 2 eşleşen değerin döndürüleceği sütun numarasıdır, bu referansları ihtiyacınıza göre değiştirebilirsiniz.


Eğer varsa Kutools for Excel, Onun ile Gelişmiş Kombine Satırları özelliği sayesinde, bu işi kolaylıkla kolaylıkla bitirebilirsiniz. Bu özellik, tüm eşleşen değerleri başka bir sütundaki aynı verilere dayalı olarak belirli bir sınırlayıcıyla birleştirmenize yardımcı olabilir.

Kutools for Excel : 300'den fazla kullanışlı Excel eklentisi ile 30 günde sınırlama olmaksızın ücretsiz deneyin.

Kurduktan sonra Kutools for Excellütfen aşağıdaki işlemleri yapın:

1. Belirli verilere dayalı olarak karşılık gelen değerleri almak istediğiniz veri aralığını seçin.

2. Sonra tıklayın Kutools > Birleştir ve Böl > Gelişmiş Kombine Satırları, ekran görüntüsüne bakın:

3. In Gelişmiş Kombine Satırları iletişim kutusunda, birleştirmek istediğiniz sütun adını tıklayın ve ardından Birincil anahtar düğmesi, ekran görüntüsüne bakın:

doc vlookup birleştirme 6

4. Ardından, eşleşen değerleri döndürmek istediğiniz başka bir sütun adını tıklayın ve Birleştirmek birleştirilmiş değerleri ayırmak için bir ayırıcı seçmek için ekran görüntüsüne bakın:

doc vlookup birleştirme 7

5. Ve sonra tıklayın Ok düğmesi, aynı değerleri temel alan karşılık gelen tüm değerler belirli bir ayırıcıyla birleştirilmiştir, ekran görüntülerine bakın:

doc vlookup birleştirme 8 2 doc vlookup birleştirme 9

 Kutools for Excel'i şimdi indirin ve ücretsiz deneyin!


Kutools for Excel: 300'den fazla kullanışlı Excel eklentisi ile 30 günde sınırlama olmaksızın ücretsiz deneyin. Hemen indirin ve ücretsiz deneme!

En İyi Ofis Üretkenlik Araçları

🤖 Kutools AI Yardımcısı: Aşağıdakilere dayalı olarak veri analizinde devrim yaratın: Akıllı Yürütme   |  Kodunu oluşturun  |  Özel Formüller Oluşturun  |  Verileri Analiz Edin ve Grafikler Oluşturun  |  Kutools İşlevlerini Çağır...
Popüler Özellikler: Yinelenenleri Bul, Vurgula veya Tanımla   |  Boş Satırları Sil   |  Veri Kaybı Olmadan Sütunları veya Hücreleri Birleştirin   |   Formülsüz Tur ...
Süper Arama: Çoklu Ölçütlü VLookup    Çoklu Değer VLookup  |   Birden Çok Sayfada VLookup   |   Bulanık Arama ....
Gelişmiş Açılır Liste: Hızla Açılır Liste Oluşturun   |  Bağımlı Açılır Liste   |  Çoklu Seçim Açılır Liste ....
Sütun Yöneticisi: Belirli Sayıda Sütun Ekleme  |  Sütunları Taşı  |  Gizli Sütunların Görünürlük Durumunu Değiştir  |  Aralıkları ve Sütunları Karşılaştırın ...
Öne Çıkan Özellikler: Izgara Odağı   |  Tasarım görünümü   |   Büyük Formül Çubuğu    Çalışma Kitabı ve Sayfa Yöneticisi   |  Kaynak Kütüphanesi (Otomatik metin)   |  Tarih Seçici   |  Çalışma Sayfalarını Birleştirin   |  Hücreleri Şifrele/Şifresini Çöz    E-postaları Listeye Göre Gönder   |  Süper Filtre   |   Özel Filtre (kalın/italik/üstü çizili filtre...) ...
En İyi 15 Araç Seti12 Metin Tools (Metin ekle, Karakterleri Kaldır, ...)   |   50+ Grafik Türleri (Gantt şeması, ...)   |   40+ Pratik Formüller (Yaşı doğum gününe göre hesapla, ...)   |   19 sokma Tools (QR Kodunu Girin, Yoldan Resim Ekle, ...)   |   12 Dönüştürme Tools (Sayılardan Kelimelere, Para Birimi Dönüştürme, ...)   |   7 Birleştir ve Böl Tools (Gelişmiş Kombine Satırları, Bölünmüş hücreler, ...)   |   ... ve dahası

Kutools for Excel ile Excel Becerilerinizi Güçlendirin ve Daha Önce Hiç Olmadığı Gibi Verimliliği Deneyimleyin. Kutools for Excel, Üretkenliği Artırmak ve Zamandan Tasarruf Etmek için 300'den Fazla Gelişmiş Özellik Sunar.  En Çok İhtiyacınız Olan Özelliği Almak İçin Buraya Tıklayın...

Açıklama


Office Tab, Office'e Sekmeli Arayüz Getirir ve İşinizi Çok Daha Kolay Hale Getirir

  • Word, Excel, PowerPoint'te sekmeli düzenlemeyi ve okumayı etkinleştirin, Publisher, Access, Visio ve Project.
  • Yeni pencereler yerine aynı pencerenin yeni sekmelerinde birden çok belge açın ve oluşturun.
  • Üretkenliğinizi% 50 artırır ve her gün sizin için yüzlerce fare tıklamasını azaltır!
Comments (16)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Is there any way to get the unique "name" for "class1"
This comment was minimized by the moderator on the site
Hello, sym-john,
Maybe the below article can solve your problem, please view it:
https://www.extendoffice.com/documents/excel/3381-excel-extract-unique-values-with-criteria.html
This comment was minimized by the moderator on the site
This is working great for me - is there anyway to change it that it checks if the cell contains rather than a complete match? Basically I have a list of tasks where:
Column A: Dependencies (eg 10003 10004 10008)
Column B: Task Reference (eg 10001)
Column C: Dependent Tasks (the column for the formula result) - where it would lookup the task reference to see which rows contain it in Column A, and then list the Task Reference of those tasks.

E.g:

Row | Column A | Column B | Column C
1 | | 10001 | 10002 10003
2 | 10001 | 10002 | 10003
3 | 10001 10002 | 10003 |
This comment was minimized by the moderator on the site
you would want to use the Instr() function which will check for something in a string of text in a cell. You can also use Left() and Right() if you are looking for the starting or ending details.
This comment was minimized by the moderator on the site
The cusVlookup worked great for me. Another way to have a different separator is to wrap in two substitute functions. The first (from inside to out) replaces the first space with no space, the second replaces all other spaces with a " / " in mine. Could use "," if you want commas.
=SUBSTITUTE(SUBSTITUTE(cusVlookup(D2,Table1,2)," ","",1)," "," / ")

Also, if your lookup value isn't the first column, you can use 0 or negative numbers to go to column to the left.
=SUBSTITUTE(SUBSTITUTE(cusVlookup(D2,Table1,-1)," ","",1)," "," / ")
This comment was minimized by the moderator on the site
Hi, jeff,
Thanks for your sharing, you must be a warmhearted man.
This comment was minimized by the moderator on the site
I have to say, I have been trying to get a formula for combining multiple values and returning them to a single cell for 2 days now. This "How To" has saved me!! Thank you SO much! I would never have gotten it without your Module!
I do have 2 questions though. I have the deliminator as a comma instead of a space and because of that it starts out with a comma. Is there a way to prevent the start comma but keep the rest?
My second question is; When I use the fill handle it changes the range values as well as the cell value I want to look up. I want it to continue to change the cell number I want to look up but keep the same range values. How can I make this happen?

Thank you so much for your help!!
This comment was minimized by the moderator on the site
Is there a way to delete the duplicate values in the concatenate?
This comment was minimized by the moderator on the site
Hello, Jacob,
May be the following article can help you to solve your problem.
https://www.extendoffice.com/documents/excel/3381-excel-extract-unique-values-with-criteria.html

Please try, hope it can help you!
This comment was minimized by the moderator on the site
Is there a way to list the duplicate values only once, using the vba code and formula above? I am not sure where to put the countif>1 statement in the formula bar, or in the vba itself. Please help
This comment was minimized by the moderator on the site
you can add two extra condition to skip blank cells and to skip duplicates:For i = 1 To CriteriaRange.Count
If CriteriaRange.Cells(i).Value = Condition Then
If ConcatenateRange.Cells(i).Value <> "" Then 'SKIP BANKS
If InStr(xResult, ConcatenateRange.Cells(i).Value) = 0 Then 'SKIP IF FOUND DUPLICATE
xResult = xResult & Separator & ConcatenateRange.Cells(i).Value
End If
End If
End If
Next i
This comment was minimized by the moderator on the site
This is amazing but i am looking for something else, i have a table with RollNo StudentName sub1, sub2, sub3 ... Total Result, When I enter Rollnumber it should give a result like "SName Sub1 64, sub2 78,... Total 389, Result pass", is it possible
This comment was minimized by the moderator on the site
Loved the function for Excel 2013 but amended it slightly to change the separating character to ";" instead of " " and then remove the prefixed ";" from the concantenated values Results matching values in my example would have ;result01 or ;result01;result02 . Added the extra If Left(xResult, 1) = ";" to remove any extra ";" at the beginning of the string if it is the 1st character. I'm sure there is a neater way of doing it but it worked for me. :) Function CusVlookup(pValue As String, pWorkRng As Range, pIndex As Long) Dim rng As Range Dim xResult As String xResult = "" For Each rng In pWorkRng If rng = pValue Then xResult = xResult & ";" & rng.Offset(0, pIndex - 1) If Left(xResult, 1) = ";" Then xResult = MID(xResult,2,255) End If End If Next CusVlookup = xResult End Function
This comment was minimized by the moderator on the site
Make if condition for result if empty.

Function CusVlookup(lookupval, lookuprange As Range, indexcol As Long)
'updateby Extendoffice 20151118
Dim x As Range
Dim result As String
result = ""
For Each x In lookuprange
If x = lookupval Then
If Not result = "" Then
result = result & " " & x.Offset(0, indexcol - 1)
Else
result = x.Offset(0, indexcol - 1)
End If
Next x
CusVlookup = result
End Function
This comment was minimized by the moderator on the site
When using the cusvlookup is there a way to add the last name as well with a comma in between that might appear in Column C
This comment was minimized by the moderator on the site
How to get the result. Please help. data data1 result a 1 a1 b 2 a2 c b1 b2 c1 c2
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations