Free Trial

Alteryx Designer Desktop Discussions

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

Replace specific letters with clearly defined numbers

DataBlendingFan
6 - Meteoroid

Hi All,

 

I am looking for a smart way to replace letters (A-Z) with clearly defined numbers (1-26) for each letter.

 

Lets say i have a string like "A.1.B.C" and for each letter i have a specific number (A=1, B=2, C=3) which i want to replace. Outcome should be "1.1.2.3"

 

Is there any smart way to avoid usage of Replace([String], "A", "1") - 26 times?

 

Thank you guys in advance.

 

Regards,

3 REPLIES 3
grossal
15 - Aurora
15 - Aurora

Hi @DataBlendingFan,

 

you could use a lookup table and the Find Replace Tool.

 

grossal_0-1588437139437.png

 

Input 1:

grossal_1-1588437176166.png

 

Input 2:

grossal_2-1588437189641.png

 

Find Replace Settings:

grossal_3-1588437198411.png

 

Output:

grossal_4-1588437206410.png

 

 

Workflow is attached. Let me know what you think.

 

Best

Alex

cplewis90
13 - Pulsar
13 - Pulsar

Hey @DataBlendingFan,

 

Digging the name! I am also a fan of data blending! You could accomplish this with a Find/Replace Tool. I attached a workflow with an examplefind replace - l&n.PNG

DataBlendingFan
6 - Meteoroid

hi @cplewis90 , @grossal  - works perfect ! THX! 

Labels
Top Solution Authors