coba skrip berikut :
Function gabung(criteriarange As Range, criteria As Range, delimiter As String) Application.Volatile Dim sel As Range For Each sel In criteriarange If sel = criteria Then If Len(gabung) = 0 Then gabung = sel.Offset(0, 1) Else gabung = gabung & delimiter & sel.Offset(0, 1) End If End If Next End Function
kemudian pada E4 :
=gabung($B$4:$B$8,D4,"|")
fungsi TEXTJOIN tersedia pada Excel 2019, 365 dan Excel Web, selengkapnya bisa baca di TEXTJOIN function
Dear @manweljs_
Baik akan saya coba untuk skriptnya
Terimakasih
coba skrip berikut :
Function gabung(criteriarange As Range, criteria As Range, delimiter As String) Application.Volatile Dim sel As Range For Each sel In criteriarange If sel = criteria Then If Len(gabung) = 0 Then gabung = sel.Offset(0, 1) Else gabung = gabung & delimiter & sel.Offset(0, 1) End If End If Next End Functionkemudian pada E4 :
=gabung($B$4:$B$8,D4,"|")fungsi TEXTJOIN tersedia pada Excel 2019, 365 dan Excel Web, selengkapnya bisa baca di TEXTJOIN function
Dear,@manweljs_
Kira kira kalau casenya seperti ini ,data yang kita mau ambil kolom ke 2 dari refrensi data
selain tanpa merubah ofsetnya dimodule
perintah :
sel.Offset(0, 1)
Function gabung(criteriarange As Range, criteria As Range, delimiter As String, target As Range) Application.Volatile Dim sel As Range For Each sel In criteriarange If sel = criteria Then If Len(gabung) = 0 Then gabung = target.Cells(sel.Row - target.Row + 1, 1) Else gabung = gabung & delimiter & target.Cells(sel.Row - target.Row + 1) End If End If Next End Function
=gabung($B$9:$B$13,E9,"|",$C$9:$C$13)
Dear @manweljs_ Terimakasih atas bantuannya
SUPER SEKALI