Start Free Trial

Alteryx Designer Desktop Discussions

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

If Column A contains MAHESH and then in Column B the word starts with A or B then replace

Hearnest
5 - Atom

Hi Team I'm trying to resolve below scenario please help

If Column A contains MAHESH and then in Column B the word starts with A or B then replace with VIGNESH

5 REPLIES 5
Deano478
12 - Quasar

hey @Hearnest you can give

IF Contains([Column A], "MAHESH") AND (StartsWith([Column B], "A") OR StartsWith([Column B], "B")) THEN "VIGNESH" ELSE [Column B] ENDIF

the following formula a try

Hearnest
5 - Atom

Hi deano478, 

 

This worked perfectly... ! Thanks Much...

Also within same formula can we add an extended condition if column A contains name RAMESH then in Column B the first letter of the word starts with "A to H alphabet then it should replace with SUMESH

 

Can you help with this as well

 

Deano478
12 - Quasar

@Hearnest give this a try it should work

IF Contains([Column A], "MAHESH") AND (StartsWith([Column B], "A") OR StartsWith([Column B], "B")) THEN "VIGNESH" ELSEIF Contains([Column A], "RAMESH") AND (StartsWith([Column B], "A") OR StartsWith([Column B], "B") OR StartsWith([Column B], "C") OR StartsWith([Column B], "D") OR StartsWith([Column B], "E") OR StartsWith([Column B], "F") OR StartsWith([Column B], "G") OR StartsWith([Column B], "H")) THEN "SUMESH"
ELSE [Column B] 
ENDIF
Hearnest
5 - Atom

Thank you ! it worked ...

Sameer113
5 - Atom

Hi @Hearnest

You can use this:

 

IF CONTAINS([Column A], "MAHESH") AND (Left([Column B],1) = "A' OR Left([Column B],1) = "B")) THEN "VIGESH" ELSE [Column B]

ENDIF

Labels
Top Solution Authors