August 28, 201510 yr For some fields I use the Proper() function to return the first letter of each word as uppercase, and that works. Only, when there is "sa de cv" at the end of the text (all upper case or mixed), it should be/stay as "sa de cv". Is there a clever calc to put the text in Proper(), except that part, that has to be all in lower case ? I tried several combinations Proper()/Lower()/Substitute with no success, except knowing what is not working. So it is not all wasted time....
August 28, 201510 yr How about: Substitute ( Proper ( text ) & "§" ; [ "Sa De Cv§" ; "sa de cv" ] ; [ "§" ; "" ] )
August 28, 201510 yr Author Thanks Comment. I stumbled over some other forms of "writing". S. A. DE C. V. and S.A de C.V. (and some other weird combinations) I suppose I have to add a Substitute part as: [ "S. A. DE C. V.§" ; "sa de cv" ] ; [ "§" ; "" ] to make it work ?
August 28, 201510 yr No, you'll have to make it: Substitute ( Proper ( text ) & "§" ; [ "Sa De Cv§" ; "sa de cv" ] ; [ "S. A. De C. V.§" ; "sa de cv" ] ; [ "S.a De C.v.§" ; "sa de cv" ] ; [ "§" ; "" ] ) Note that Substitute() is case-sensitive, so in order to save on substitution pairs it's better to do the Proper() part first. This means that any "weird combination" you want to add needs to be added in its Proper form: "S. A. DE C. V." --> "S. A. De C. V." and "S.A de C.V." --> "S.a De C.v.".
August 28, 201510 yr Author Now I understand. (the FM Help is not very clear about this) Thanks Comment, I appreciate.
August 28, 201510 yr Author Oh shoot !! Even a space as last character gives problems. So the Trim() function has to come before the Proper. First Trim (remove not needed spaces) then Proper, then Substitute all weird combinations
Create an account or sign in to comment