4Justme2 Posted November 23, 2012 Posted November 23, 2012 I had a field to concatonate a person's FullName: NameFirst&" "&MiddleInitial&" "&LastName&" "&Suffix But I noticed, if the middle initial field was blank I'd still get the additional space between the NameFirst and MiddleName. So I tried modifying the FullName field as follows in an effort to get rid of the additional space in those cases where the MiddleInitial was null (but this didn't work either): Trim(NameFirst)&" "&Trim(MiddleInitial)&" "&Trim(NameLast)&" "&(Suffix) Example above produces: Bill H Muldoon Sr However, if the MiddleInitial field is null the above calculation produces an extra space between the NameFirst and the MiddleInitial. Bill Muldoon Sr… when what I want to produce is Bill Muldoon Sr How can I modify this calculation so if the MiddleInitial field is null there is no space between NameFirst and MiddleInitial? Any suggestions would be greatly appreciated.
LaRetta Posted November 23, 2012 Posted November 23, 2012 (edited) Try either: Substitute ( List ( NameFirst ; NameMiddle ; NameLast ; Suffix ) ; CR ; " " ) ... where CR is pilcrow ( I can't make it on iPad.) Or Trim ( NameFirst & " " & NameMiddle & " " & NameLast & " " & Suffix ) Edited November 23, 2012 by LaRetta
LaRetta Posted November 23, 2012 Posted November 23, 2012 Oh geez, I original posted TrimAll() and then changed it. That is what I get for answering within 30 seconds of waking up ... no brain yet. Thanks for the catch Michael. :^) So it would be, as in the first email you received, Marsha: TrimAll ( NameFirst & " " & NameMiddle & " " & NameLast & " " & Suffix ; 0 ; 0 )
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now