View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
VBA Noob[_13_] VBA Noob[_13_] is offline
external usenet poster
 
Posts: 1
Default Proper Case in Function


Thanks for your advice but think I solve it myself

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(Application.Pro per(cell.Value),
Application.Proper(myTarget.Value), 1)
If x 0 Then
If myAnswer < 0 Then myAnswer = (myAnswer) & ", "
myAnswer = Application.Proper(myAnswer & cell.Value)
x = 0
End If
Next cell
If myAnswer = 0 Then myAnswer = ""
ListSearch = myAnswer
End Function


--
VBA Noob
------------------------------------------------------------------------
VBA Noob's Profile: http://www.excelforum.com/member.php...o&userid=33833
View this thread: http://www.excelforum.com/showthread...hreadid=554546