V
VBA Noob
Hi all,
I have mixed text which the below function ignores. I know I need t
add Ucase or ProperCase but not sure where to add it.
Function ListSearch(Target As Range, SearchList As Range)
Dim myTarget, mySearchList As Range
Set myTarget = Target
Set mySearchList = SearchList
For Each cell In mySearchList
On Error Resume Next
x = Application.WorksheetFunction.Find(cell.Value, myTarget.Value, 1)
If x > 0 Then
If myAnswer <> 0 Then myAnswer = myAnswer & ", "
myAnswer = myAnswer & cell.Value
x = 0
End If
Next cell
If myAnswer = 0 Then myAnswer = ""
ListSearch = myAnswer
End Functio
I have mixed text which the below function ignores. I know I need t
add Ucase or ProperCase but not sure where to add it.
Function ListSearch(Target As Range, SearchList As Range)
Dim myTarget, mySearchList As Range
Set myTarget = Target
Set mySearchList = SearchList
For Each cell In mySearchList
On Error Resume Next
x = Application.WorksheetFunction.Find(cell.Value, myTarget.Value, 1)
If x > 0 Then
If myAnswer <> 0 Then myAnswer = myAnswer & ", "
myAnswer = myAnswer & cell.Value
x = 0
End If
Next cell
If myAnswer = 0 Then myAnswer = ""
ListSearch = myAnswer
End Functio