Hey guys,
I've got a base that tracks books in a small library. I need to create a field that extracts the last 3 digits of the author's last name and it has become very complicated, haha.
Example author names:
- John Bunyan
- C.S. Lewis
- Alister E. McGrath
- C. Everett Koop
- Dr. William Lindner Jr.
Authors very often have prefixes like Dr. or Rev. and they like including initials and suffixes, too - lol!
So how do I build a formula that will pull the last 3 letters of the last name like this:
- John Bunyan = BUN
- C.S. Lewis = LEW
- Alister E. McGrath = MCG
- C. Everett Koop = KOO
- Dr. William Lindner Jr. = LIN
This gets me very close:
UPPER(LEFT(REPLACE({Author(s)},1,FIND("~",SUBSTITUTE({Author(s)}," ","~",LEN({Author(s)}) - LEN(SUBSTITUTE({Author(s)}," ","")))),""), 3))
...but it breaks with suffixes 😞
Can anyone help me tweak it to work with suffixes???
Thanks so much for any help!