Hello,
I am have one column contains various numbers and letters.
Column A:
ARS_00100000
ARS_00002099
ARS_00600000
ARS_011-00000
ARS_01500000
EIS_02000000
EIS_021-00000
EIS_000000
EIS_00250-0000
EIS_0002600000
EIS_03500000
AAS_036-000-00
AAS_04000000
I want to update Column A based on this logic:
I wrote:
IF Contains([Column A],'-') THEN REGEX_Replace([Column A], '-', '')
ELSEIF Contains([Column A],'_00000') THEN REGEX_Replace([Column A], '_00000', '_')
ELSEIF Contains([Column A],'_0000') THEN REGEX_Replace([Column A], '_0000', '_')
ELSEIF Contains([Column A],'_000') THEN REGEX_Replace([Column A], '_000', '_')
ELSEIF Contains([Column A],'_00') THEN REGEX_Replace([Column A], '_00', '_')
ELSEIF Contains([Column A,'_0') THEN REGEX_Replace([Column A], '_0', '_')
ELSE [Column A]
ENDIF
This did not work, I then wrote the same code with FindString and Replace but this didn't work either.
What am I doing wrong? Thanks for your help
It looks like maybe you have some extra quotations in your formula
ELSEIF Contains([ColoumA],'“_00000') THEN REGEX_Replace([ColoumA], '“_00000', '_')
You have extra quotes before the _00000 as well as in your second instance down at the end. You also have column spelled Coloum, not sure if that is the issue. What is the error message that you are seeing?
Corrected that, working while home schooling!🙄
Please can you help with the code. I am not sure how to create a if statement based on the condition and rule