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

trim

rohini
8 - Asteroid

Hi All,

 

I want to convert the below formula in excel to alteryx can some one please help

 

TRIM(LEFT(K71,IFERROR(FIND(" - ",K71,1),IFERROR(FIND(" ",K71,1),LEN(K71)))))

 

where for eg K7 = 

ab/3/ /195027

 

the end result is 

MK/3/

 

Thank you.

 

regards

Rohini

2 REPLIES 2
markcurry
12 - Quasar

Hi Rohini,

 

If you have K7 as 

ab/3/ /195027

 

the results of that formula would be :

ab/3/

 

Are you mixing up K7 and K71 that's referenced in the formula?

 

So if you're just looking to take the characters to the left of the space, or a dash, then you can use this formula...

 

IF FindString([Field1], "-") != -1 THEN
      Left([Field1],FindString([Field1], "-"))
ELSEIF FindString([Field1], " ") != -1 THEN
      Left([Field1],FindString([Field1], " "))
ELSE
       [Field1]
ENDIF

 

 

 

rohini
8 - Asteroid

thank you so much!

 

this worked perfectly.

Labels
Top Solution Authors