Hi,
I'm looking at two columns:
Name 1 Name 2
alpha Kilo 1 alpha
beta 1 xray
How can I Alteryx to search create move the Name 2 variable in Name 2?
Solved! Go to Solution.
Hi @Tahir89 ,
I'm attaching two methods, one with trim left considering that what you want to remove is at the beginning of your cell and also another one replacing every match.
Best,
Fernando Vizcaino
Hi @Tahir89,
could you provide a bit more context and information?
The first example looks like you want the first word. I you always want to have the first word, you could use a Formula, Regex or even the Text-to-Columns tool.
What is the second row telling us? 'beta 1 -> xray' ? What's the rule behind this?
Best
Alex
Hi Grossal, the rule would be:
if Column_A contains Column_B remove column_B variable from column_A
the word can be at any position.
Hi @Tahir89, you could use a formula tool to achieve this result. The formula would like something like:
TRIM(
IF Contains([Name 1],[Name 2])
THEN REGEX_Replace([Name 1],[Name 2],'')
ELSE [Name 1]
ENDIF
)
Attached is an implementation of this formula. Hope this helps.
Hi @Tahir89,
sorry for being late to the party. I know that @AbhilashR already showed a solution, but here is another one.
You can use the basic "Replace" function without any checking if the word is contained or not, because nothing will happen if it isn't contained.
Workflow attached.
Best
Alex