Free for PREMIUM members
Function lookupjoin(SearchValue As Variant, SearchRange As Range, JoinRange As Range, wordSeperator As String, Optional LineSeperator As String)
Dim x As Long, y As Long, z As Long
Dim d As Object
Set d = CreateObject("Scripting.Dictionary")
Dim JoinString As String
z = JoinRange.Columns.Count
ReDim colArr(1 To z)
For x = 1 To SearchRange.Count
If SearchRange(x, 1) = SearchValue Then
For y = 1 To z
colArr(y) = JoinRange(x, y)
JoinString = Join(colArr, wordSeperator)
If Not d.exists(JoinString) Then
d.Add JoinString, ""
If LineSeperator = Empty Then LineSeperator = vbCrLf
lookupjoin = Join(d.keys, LineSeperator)
Open in new window
We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.