This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I'm sorry but I'd have to go to a library (inside of a museum) to dust off a book on Excel to answer your question. I'll answer it in the 21st century with a regular expression. I still don't know what your objective is and why you wouldn't use a text to columns to parse on the | symbol. But before I go there, here is a cut & paste from the help on FindString():
FindString(String,Target): Searches for the occurrence of a particular string (Target) within another string (String) and returns the numeric position of its occurrence in the string.
Returns the 0 based index of the first occurrence of Target in String. Returns -1 if no occurrence.
FindString([Name], "John")returns 0 when the string contains John and returns -1 when the string does not.
IF (FINDSTRING([Name], "John") =0) THEN "John Smith" ELSE "Other" ENDIFreturns John Smith when the string contains John and returns Other when the string does not.
That expression will group everything to the left of a Pipe ''|" as Group 1 or $1. It also groups everything after the pipe as $2. The replacement that I chose was the second group. So if you are creating a new variable as what is after the pipe, it will work for you. If you wanted everything up to the first pipe (not including it), then change $2 to $1.
Alteryx ACE & Top Community Contributor
Chaos reigns within. Repent, reflect and reboot. Order shall return.