Hi,
Facing an Issue with one of my formulas
Input given =1234567890
Formula Used = ReplaceChar(ReplaceChar(ReplaceChar(ReplaceChar(ReplaceChar(ReplaceChar(ReplaceChar(ReplaceChar(ReplaceChar(ReplaceChar([ID],"1","0"), "2","9"),"3","8"),"4","7"),"5","6"),"6","5"),"7","4"),"8","3"),"9","2"),"0","1")
Output =1234554321
Desired Output =0987654321
Please help,
Thanks in advance.
Solved! Go to Solution.
Hi @ImadZidan @PhilipMannering ,
Actually this a sample data the use-case is bit different
For example:- I have a string "UA12GF43" and the Output i want is "UA09GF78" .
Hello @gauravnegi2 ,
I had a feeling its more thank a reverse.
However, I fail to understand the connection between the strings in the example and the order.
How did you workout the transformation from "UA12GF43" To "UA09GF78" .
Hello @gauravnegi2 ,
I see what you are doing. I looked at the replace functions you have wrote.
This will give you an idea.
@gauravnegi2 — And, if you just want to reverse the order of any value (String/Numeric), then refer to the attached workflow.
Input given =1234567890
Desired Output =0987654321
Input given ="AB 12CD"
Desired Output ="DC21 BA"
If this post assists in resolving the question, please mark it "Like", or "Solved" if it resolves the question. This will help other users find the same answer/resolution. Thank you.
Hi @gauravnegi2 , by using reversestring() function yur problem can be solved, please have a look.
Thanks.
@vizAlter @grazitti_sapna @gr I don't want to reverse the whole string but i want to change the number in an order
Initial no replaced by
1-0
2-9
3-8
4-7
5-6
6-5
7-4
8-3
9-2
0-1
For example:- I have a string "UA12GF43" and the Output i want is "UA09GF78" . Only the number should be replaced.
by find and replace tool we can achieve this by putting a mapping file but my requirement is with formula tool
Hi @ImadZidan,
Yes we can do it through Replace function but when we going to build a macro to implement this for multiple column it won't work, that's why i have to do it in Formula