silverbluemoon
New Member
- Joined
- May 19, 2010
- Messages
- 25
- Office Version
- 365
- 2019
- Platform
- Windows
I found the following awesome script on digital-help.com that allows me to lookup and return multiple values concatenated into one cell (which I need to do):
THEN, I only have to enter THIS in each cell:
This PERFECT, except that I only need to return values that start with a specific letter. I need to figure this out quickly, so please help if you can! Thank you!!
Code:
[COLOR=#000000]Function Lookup_concat(Search_string As String, _[/COLOR]
Search_in_col As Range, Return_val_col As Range)
Dim i As Long
Dim result As String
For i = 1 To Search_in_col.Count
If Search_in_col.Cells(i, 1) = Search_string Then
result = result & " " & Return_val_col.Cells(i, 1).Value
End If
NextLookup_concat = Trim(result)
[COLOR=#000000]End Function[/COLOR]
THEN, I only have to enter THIS in each cell:
Code:
=Lookup_concat(Look_up_value, Search_in_column, Concatenate_values_in_column)
This PERFECT, except that I only need to return values that start with a specific letter. I need to figure this out quickly, so please help if you can! Thank you!!
Last edited: