Spreadsheet Formulas

css navigation by Css3Menu.com

Rearrange A Name

Pulled down list of Google Contacts and was preparing the list to go to my new Email Client. I was taking First, Last, and Middle name and arranging in two ways.

  • In the first example, I look to see if the First Name is blank (length equals zero) and if so picks up CompanyName in column AR.
  • In the second where I am expecting the result to be Last comma First Middle, I look whether LastName is zero length and get CompanyName.

=IF(LEN(A2)=0,AR2,A2&CHAR(32)&IF(LEN(B2)>0,B2&CHAR(32)&C2)

=IF(LEN(C2)=0,AR2,C2&", "&A2&IF(LEN(B2)>0,CHAR(32)&B2,""))


© MMXX

Updated:  09/25/2020 10:49
This page added:  10 September 2020