Skip to content

Instantly share code, notes, and snippets.

@walkergv
Created May 13, 2013 22:28
Show Gist options
  • Save walkergv/5572040 to your computer and use it in GitHub Desktop.
Save walkergv/5572040 to your computer and use it in GitHub Desktop.
VBA User Defined Function for finding keyword Matches in a keyword by looking through a list of available keywords.
Function ShowMatch(Keyword As String, ByVal MyRange As Range) As String
Dim Delimiter As String: Delimiter = "-"
Dim Temp As String: Temp = ""
For Each Row In MyRange.Rows
For Each cell In Row.Cells
If InStr(Keyword, cell) > 0 Then
Temp = Temp + Delimiter + cell
End If
Next cell
Next Row
ShowMatch = StrConv(Right(Temp, Len(Temp) - 1), vbLowerCase)
End Function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment