Hi Sravanthi,
You got it.
I've created few more variables and updated the existing ColB.
You'll have to create the below new variables first and then update the ColB.
- ColA_togetfirstFrom =Trim(If(Pos([ColA];"From")=1 And Pos([ColA];" From")>1) Then Substr([ColA];1;Pos([ColA];" From")-1) Else "")
- ColA_togetsecondFrom =Trim(If(Pos([ColA];"From")=1 And Pos([ColA];" From")>1) Then Substr([ColA];Pos([ColA];" From")+1;Length([ColA])) Else "")
- ColB_firstFrom =Substr([ColA_togetfirstFrom];1;Pos([ColA_togetfirstFrom];"To")-1)
- ColB_secondFrom =Substr([ColA_togetsecondFrom];1;Pos([ColA_togetsecondFrom];"To")-1)
- Finally, updated (new condition added on top in the list of Ifs) ColB =If(Pos([ColA];"From")=1 And Pos([ColA];" From")>1) Then [ColB_firstFrom]+" "+[ColB_secondFrom] ElseIf(Match([ColA];"From*")=1 And Match([ColA];"*To*")=1) Then Substr([ColA];1;Pos([ColA];"To")-1) ElseIf(Pos([ColA];"To")=1) Then "" ElseIf(Match([ColA];"*To*")=0) Then [ColA]
Create first 4 variables for "To" part as well and then update the ColC.
Hope that helps. Let me know if it did.
Thanks,
Mahboob Mohammed