Find the last occurrence of a character in a string
Posted on 2013-01-14
I have a list of names. I want to separate out the last name from this list. The list contains names in the following configurations.
1. A Billards
2. A A Billards
3. A & B Billards
I need to find the last occurrence of a space character in the text string of the name.
I have tried various solutions. I added a User Defined Module that reversed the character string so I could then find the first occurrence and then re reverse it. Problem was that when I saved my UDM 2 things happened. 1. The excel file reverted to an earlier version and I lost all the work I was doing. 2. when I went to use the UDM again, I got a #NAME error that I was not able to correct. Probably there was some security setting on my computer that prevents UDM's from working and I don't know how to correct that setting.
Is there a simpler way to do this?
I also tried the Find and Substitute functions but I have not been able to get them to work properly.
I would prefer to use existing excel functions and avoid VBA script.