I have a column in Excel that needs to clean up the string before some of the items have URL-Safe encoding in it and then grab the actual Receipt number.
This list....
Receipt 20Number 202017310 2E001 20refund
Receipt 20Number 201102323 2E001 20charge
Receipt 20Number 202017314 2E001 20refund
Receipt Number 1074202.005
Receipt Number 1074204.005
Receipt 20Number 201102332 2E001 20charge
Would then turn into....
2017310.001
1102323.001
2017314.001
1074202.005
1074204.005
1102332.001
So i have managed to do it, but i'm wondering if there is a cleaner way of doing this without having to resort to a Macro? I have 3 instances of the cell i'm using (in this case I1487). I figure out if its the kind of string where i need to replace the extra characters then remove the characters are pre-defined points.
Its more or less doing this:
Does string contain 'Receipt 20Number'
1. Remove End characters ( IE: '20refund')
2. Change ' 2E00' to '.00'
3. Change ' 20' to ' ' (AfterNumber)
4. Change ' 20' to ' ' (Before Number)
=MID(IF(ISERROR(FIND("Receipt 20Number 20",I1487,1)),I1487,REPLACE(REPLACE(REPLACE(REPLACE(I1487,33,9,""),27,3,"."),17,3," "),8,3," ")),16,11)
Not a big problem since i have it working but i'm worried about someone in the future looking at the excel sheet and going 'what the heck is this doing'
Thanks for your help.
Bookmarks