Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Help me in removing Suffix from Names

mmustkee
9 - Comet

Hi Team,

 

I want to remove suffix such as Mr. Mrs. Miss Ms. Dr. from names which generally comes in the last with or without space. Please help me removing from last only but sometimes we have names ending with Mr. or Mr. like ADAMS or MYANMR. how to solve this. I have a list where I have put some suffix in the beginning as well but I want them to be the same without any change. Kindly refer names for example below:

(Example removed)

 

 

9 REPLIES 9
carlosteixeira
15 - Aurora
15 - Aurora

Hello @mmustkee 

 

folow a workflow with one way to do this.

 

carlosteixeira2005_0-1611058966099.png

I hope help!

Carlos A Teixeira
mmustkee
9 - Comet

Thanks a lot Carlos.

It worked.

mmustkee
9 - Comet

Hi Carlos,

 

I tried to apply the formula which you provide. But we have an error. It is actually deleting all from the names which are ending with either 'M", 'S" or "R"

Please note that we have "R" deleted from Dharmendar and "S" deleted from MISSshree/sheebs. We only want to remove MR, MRS, MS, DR or MISS or the name should remain as it is.

R deleted from 

Kindly refer names below and advise. 

 

MRS Smith/JOhnMr
MISStrong/Moe M
MISSTest/Anne
 
 
 
 

 

Thanks for your help in advance.

 

Thanks,

Mohammad Mustkeem

carlosteixeira
15 - Aurora
15 - Aurora

Hello @mmustkee 

 

Try use this.

 

I used a REGEX formula

 

REGEX_Replace([Field1], '(^MRS)|(MRS$)|(^MS)|(MS$)|(^MR)|(MR$)|(^DR)|(DR$)|(^MSMRS)|(MSMRS$)|(^MISS)|(MISS$)', '')

 

(^MRS) - Star with MRS

| - OR

(MRS$) - Finish with MRS

 

and successively.

 

I hope this help

 

 

 

 

Carlos A Teixeira
mmustkee
9 - Comet

Great help.

 

Thanks a lot.

Nazia
5 - Atom

@carlosteixeira Hello, Can I use the same formula for removing prefix like Mr /Mrs / Dr / Miss from field names? 

 

 

carlosteixeira
15 - Aurora
15 - Aurora

Hi @Nazia yes, absolutely.

 

Carlos A Teixeira
Nazia
5 - Atom

@carlosteixeira

Thanks a lot for replying! I have a column called Provider Name from which I want to remove Prefix like Mr. / Dr. / Miss / Mrs. and Suffix like DVM /MVD etc 

i was able to remove suffixes using your REGEX Replace formula 

REGEX_Replace([Provider Name], '(^DVM)|(DVM$)|(^VMD)|(VMD$)|(^CVA)|(CVA$)|(^CCRT)|(CCRT$)|(^CHTV)|(CHTV$)|(^DVM,CVA,CCRT,CHTV)|
(^DACVECC)|(DACVECC$)|(DVM,CVA,CCRT,CHTV$)', '')

However not able to remove prefixes using the same.

Attaching the column Provider Name from which I wish to remove Prefix and Suffix before and after I used your formula

Provider Name

Cristina Portus , DVM
Dr. Eugenie Bucher, VMD
Dr. Marco Ruffato, DVM
Dr. Eugenie Bucher, VMD
Dr. Eugenie Bucher, VMD
Dr. Eugenie Bucher, VMD
Dr. Eugenie Bucher, VMD
Dr. Eugenie Bucher, VMD
Dr. Eugenie Bucher, VMD
Dr. Eugenie Bucher, VMD
Paula E Gore Miller

Cindy Krane, DVM
Cindy Krane, DVM
Cindy Krane, DVM
Dr. Glenn M Zeitz, VMD
Dr. Glenn M Zeitz, VMD
Dr. A. Turkell, DVM,CVA,CCRT,CHTV
Dr. A. Turkell, DVM,CVA,CCRT,CHTV
Dr. A. Turkell, DVM,CVA,CCRT,CHTV
Dr. A. Turkell, DVM,CVA,CCRT,CHTV
Dr. A. Turkell, DVM,CVA,CCRT,CHTV
Anna C Aristide
Dr. Anthony Krawitz, DVM
Dr. Anthony Krawitz, DVM
Dr. Anthony Krawitz, DVM
Dr. Anthony Krawitz, DVM
Dr. Anthony Krawitz, DVM
Dr. Anthony Krawitz, DVM
Dr. Anthony Krawitz, DVM
Dr. Anthony Krawitz, DVM
Dr. Anthony Krawitz, DVM
Dr. Anthony Krawitz, DVM
Dr. Anthony Krawitz, DVM
Dr. Anthony Krawitz, DVM
Dr. Anthony Krawitz, DVM
Dr. Anthony Krawitz, DVM
Dr. Anthony Krawitz, DVM
Dr. Anthony Krawitz, DVM
Dr. Anthony Krawitz, DVM
Dr. Anthony Krawitz, DVM
Dr. Anthony Krawitz, DVM
Dr. Anthony Krawitz, DVM
Dr. A. Turkell, DVM,CVA,CCRT,CHTV
Dr. A. Turkell, DVM,CVA,CCRT,CHTV
Dr. A. Turkell, DVM,CVA,CCRT,CHTV
Dr. A. Turkell, DVM,CVA,CCRT,CHTV
Dr. A. Turkell, DVM,CVA,CCRT,CHTV
Dr. A. Turkell, DVM,CVA,CCRT,CHTV
Dr. A. Turkell, DVM,CVA,CCRT,CHTV
Dr. A. Turkell, DVM,CVA,CCRT,CHTV
Dr. A. Turkell, DVM,CVA,CCRT,CHTV
Dr. A. Turkell, DVM,CVA,CCRT,CHTV
Dr. A. Turkell, DVM,CVA,CCRT,CHTV
Dr. Glenn M Zeitz, VMD
Dr. Glenn M Zeitz, VMD

carlosteixeira
15 - Aurora
15 - Aurora

Hi @Nazia 

Please try to use this workflow.

 

Thanks

Carlos A Teixeira
Labels