This works like the Instr() function, in reverse.
Function xLastInStr(tstr As String, twhat As String) As Integer
'*******************************************
'Name: xLastInStr (Function)
'Purpose: Return location of last instance of a character or phrase.
'Inputs: Call xLastInStr("the quick brown fox jumped the lazy dog", "the")
'Output: 28 - Location of last occurence of "the"
'*******************************************
Dim i As Integer, n As Integer, tlen As Integer
n = 0
tlen = Len(twhat)
For i = Len(RTrim(tstr)) To 1 Step -1
If Mid(tstr, i, tlen) = twhat Then
n = i
Exit For
End If
Next i
xLastInStr = n
End Function