Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.

Alteryx Designer Desktop Discussions

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

Excel mid formula excel equivalent

Usamah22
8 - Asteroid

Hello

 

i have a column with text such as 1010000001010010.

 

i need to determine whether the 10th value is 1 and then use that for a conditional statement. What can i use to get this?

4 REPLIES 4
GiuseppeC
Alteryx
Alteryx

Hi @Usamah22,

 

this function in a formula tool will allow you to extract the 10th character from your string, which you can then use in a conditional statement.

 

Substring([YourStringField],9,1)

 

Notice 9 to indicate the 10th character because the start of the substring is 0-based (first character is position 0).

 

Hope this helps!

Giuseppe

Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @Usamah22,

 

Using the formula:

IF Substring(ToString([String]),9,1) = '1' THEN 'True' ELSE 'False' ENDIF

 

This will return "True" if the 10th character = 1 and "False" if it does not.

 

image.png

If this solves your issue please mark the answer as correct, if not let me know! I've attached my workflow for you to download if needed.

 

Regards,

Jonathan

Usamah22
8 - Asteroid

thank you!

zahinrahman
5 - Atom
Substring would be the excel equivalent in Alteryx!
Labels