Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Select numbers within text

datwell25
5 - Atom

Apologies if this has been asked before....I cant seem to find what I am after.

 

I have a field where I want to select only 4 digits from text which is in the middle of the data. What formula/expression do I use for this?

 

Sample:  L300033010101  (I need the numbers from 6-9, therefore L300033010101 )

 

Expected result: 3301

 

Many thanks.

 

 

2 REPLIES 2
BenMoss
ACE Emeritus
ACE Emeritus

Check out the substring() function within the formula tool.

 

In your instance something like 

 

substring([field],6,4)

Should do the trick.

 

Ben

datwell25
5 - Atom

Thanks Ben......worked a treat. 

 

Much appreciated.

Labels
Top Solution Authors