Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On Sat, 08 Aug 2009 22:59:18 -0400, Ron Rosenfeld
wrote: Private Function TitlePos(s As String) As Long Dim sTitles As Variant Dim i As Long sTitles = Array(" MRS ", " MR ", " MISS ") For i = 0 To UBound(sTitles) TitlePos = InStrRev(s, sTitles(i), -1, vbTextCompare) If TitlePos 0 Then Exit For Next i End Function This part should, more properly, be written as: ======================= Private Function TitlePos(s As String) As Long Dim sTitles As Variant Dim i As Long sTitles = Array(" MRS ", " MR ", " MISS ") For i = LBound(sTitles) To UBound(sTitles) TitlePos = InStrRev(s, sTitles(i), -1, vbTextCompare) If TitlePos 0 Then Exit For Next i End Function ======================== --ron |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help me solve this problem I've been struggling with for so long! | Excel Worksheet Functions | |||
Struggling to plot where I want | Charts and Charting in Excel | |||
Struggling IF value | Excel Discussion (Misc queries) | |||
Struggling Again With A VLOOKUP | Excel Worksheet Functions | |||
Help, I'm Struggling! | New Users to Excel |