We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Keeping only letters but if a field has only numbers leave them as is

chiragpatel_1
8 - Asteroid

Hi,

 

I have a column that has below variants. Note these are just some. The logic I would like is that i want to extract letters only from cells that have letters and numbers and also leave/parse cells with numbers only as they are onto a new column. How would i do that?

 BB7
BB8
BB9
BB94
BD1
BD10
BD11

38729
3873
3874
38820
38822
38828
38829
38835
38836

 

Thank you

2 REPLIES 2
DataNath
17 - Castor
17 - Castor

Hey @chiragpatel_1, is this what you're looking for?

 

2626.png

 

IF REGEX_Match([Input], '\d+') THEN [Input]
ELSE REGEX_Replace([Input], '\d', '')
ENDIF
chiragpatel_1
8 - Asteroid

Hi 

 

Can you amend the formula so that it only picks out letters before the first numerical character? numbers only cells are to be parsed as they are, that part remains the same.

 

may thanks

Labels
Top Solution Authors