Suppose you have a list like this:
Di Ruppo
Elio
De Haene
Jean-Luc
Van de Velde
Annemie
Nagase
Yoshi
del Valle Saavedra
Antonio
First names are in bold, just for your information, not in the real file
I wrote two separate function procedures to get the last name and the first name.
Code:
Dim PosSpace As Byte
Function LastName(FullName As String) As String
PosSpace = InStrRev(FullName, " ")
LastName = Left(FullName, PosSpace - 1)
End Function
Function FirstName(FullName As String) As String
PosSpace = InStrRev(FullName, " ")
FirstName = Right(FullName, Len(FullName) - PosSpace)
End Function
I'm wondering wether you can create a
single function procedure returning
2 results, in this case the last
and the firstname, in other words, an array function returning 2 results when you select 2 cells and press CTRL-SHIFT-ENTER?
Renée