0

I was wondering if it is possible to capture 5 letters off of a contacts full name based on its sequence? for example:

eg. Surname Jolie-Pitt, First Name An gie

Result: OLENG

Non-alphabetic characters (eg. Hyphens (as in Lee-Archer) apostrophes (as in O'Mara) or blank spaces (as in Eu Jin) should be ignored when counting the position of each character

0

Formulas don't provide any convenient way to strip a set of characters, but you can call SUBSTITUTE as many times as needed. I'd recommend putting this into a hidden field so you don't have to copy and paste it when finding your letters.

SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(LastName, " ", ""), "'", ""), ",", ""), "-", "")

RIGHT(LEFT(LastName_Stripped__c, 3), 2) & RIGHT(LEFT(LastName_Stripped__c, 5), 1)
& RIGHT(LEFT(FirstName_Stripped__c, 3), 2)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.