Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

First and Last Names Reversed

Hi Everyone,

When I imported my Verizon contacts into my new iPhone, all of the first and last names were switched. What I'm saying is that for each contact, the contact's first name is stored in the last name field, and the contact's last name is stored in the first name field.

I know that I can reverse the display option in the phone, but that doesn't solve the problem. Even if I set it to sort by "first last", then from here on out I would have to create new contacts by putting the first name in the last name field, and the last name in the first name field. I don't want to do that.

Does anyone know of a solution to this problem, short of me going through and fixing each contact by hand? 😟

Thanks & take care,
-Kyle

HP Pavilion Dv3, Windows 7

Posted on Mar 22, 2011 4:29 PM

Reply
Question marked as Best reply

Posted on Mar 26, 2011 4:29 PM

I did find a solution to this problem, and wanted to document it for anyone else who runs into the same problem.

  1. Set up your phone to sync with a google contact account. You can create a new google contact account or use your gmail account if you already have one. I don't remember exactly how I did this, but I don't believe it was difficult. Once you get that setup, you should be able to sync all contacts from your iPhone into google contacts.

  2. Export your contacts to a Google CSV file. Log in to Google contacts http://www.google.com/contacts and make sure you can see all of your contacts. At the upper right, there is an option to "Export". Select this, and export in Google CSV format. Save this file somewhere on your computer. It would be wise to keep an original copy of this somewhere in case you mess something up, so that you can just re-import your current contacts.

  3. Edit your contacts with Microsoft Excel. The file created by the export is openable by excel by default. I used Excel 2003 for this process. Now the objective here is to get everything under "Family Name" to move to "Given Name", and everything under "Given Name" to move to "Family Name". Lastly, you will want to rebuild the name column to use <Given Name> space <Family Name>. Here is how I accomplished this:
    1. Select and copy the entire "Family Name" Column (except for the column title). Select and copy the entire "Given Name" column (except for the column title). You should be able to see both copied columns on the clipboard, available for pasting. Now highlight the entire "Family Name" column (not the column title) and paste what you copied from "Given Name". Lastly, highlight the entire "Given Name" column (not the column title) and paste what you copied from "Family Name". Tada! The columns should be switched now.

    2. Now the tricky part. You're going to want to rebuild the entire "Name" column to use first space last format. I did this using an excel function I created. So take a look at this:
      =IF(AND(B2"",D2""),CONCATENATE(B2," ",D2),IF(B2"",B2,D2))
      Take note that for me, cell B2 was "Given Name" for my first record, and D2 was "Family Name" for my first record. So in english, this function reads "If both first name and last name exist, then concatenate (stick together) firstname, a space, and lastname. Otherwise, if only first name exists, use first name. Otherwise, if only last name exists, use just last name.
      To use this, go to your first record's "Name" column, and paste it there. Make sure you change B2/D2 if your columns are different. You should now see your first contacts first name, space, lastname. If that works use the little black box at the bottom right corner of the cell to drag it's contents down the "Name" column to the bottom of your contact list. The function should now run for all your contacts, and you should get the desired result.


  4. Import your contacts into google contacts. Test to make sure you can import your contacts from this file back into google contacts first. To do this, save the file, and import into google contacts. If it works, and you now have a ton of duplicates, delete all of your contacts and re-import. You should now be left with only your new correct contacts.

  5. Sync these contacts to your phone! I had uncheck the box to sync with google contacts in iTunes under "Info", sync, and re-check the box. You'll get a warning that x number of contacts will be erased, and x number will be added. It's just saying that it is going to delete all your phone contacts, and add all the Google contacts you just fixed.

  6. Yay! You're done. 🙂


-Kyle

Message was edited by: KFox112
1 reply
Question marked as Best reply

Mar 26, 2011 4:29 PM in response to KFox112

I did find a solution to this problem, and wanted to document it for anyone else who runs into the same problem.

  1. Set up your phone to sync with a google contact account. You can create a new google contact account or use your gmail account if you already have one. I don't remember exactly how I did this, but I don't believe it was difficult. Once you get that setup, you should be able to sync all contacts from your iPhone into google contacts.

  2. Export your contacts to a Google CSV file. Log in to Google contacts http://www.google.com/contacts and make sure you can see all of your contacts. At the upper right, there is an option to "Export". Select this, and export in Google CSV format. Save this file somewhere on your computer. It would be wise to keep an original copy of this somewhere in case you mess something up, so that you can just re-import your current contacts.

  3. Edit your contacts with Microsoft Excel. The file created by the export is openable by excel by default. I used Excel 2003 for this process. Now the objective here is to get everything under "Family Name" to move to "Given Name", and everything under "Given Name" to move to "Family Name". Lastly, you will want to rebuild the name column to use <Given Name> space <Family Name>. Here is how I accomplished this:
    1. Select and copy the entire "Family Name" Column (except for the column title). Select and copy the entire "Given Name" column (except for the column title). You should be able to see both copied columns on the clipboard, available for pasting. Now highlight the entire "Family Name" column (not the column title) and paste what you copied from "Given Name". Lastly, highlight the entire "Given Name" column (not the column title) and paste what you copied from "Family Name". Tada! The columns should be switched now.

    2. Now the tricky part. You're going to want to rebuild the entire "Name" column to use first space last format. I did this using an excel function I created. So take a look at this:
      =IF(AND(B2"",D2""),CONCATENATE(B2," ",D2),IF(B2"",B2,D2))
      Take note that for me, cell B2 was "Given Name" for my first record, and D2 was "Family Name" for my first record. So in english, this function reads "If both first name and last name exist, then concatenate (stick together) firstname, a space, and lastname. Otherwise, if only first name exists, use first name. Otherwise, if only last name exists, use just last name.
      To use this, go to your first record's "Name" column, and paste it there. Make sure you change B2/D2 if your columns are different. You should now see your first contacts first name, space, lastname. If that works use the little black box at the bottom right corner of the cell to drag it's contents down the "Name" column to the bottom of your contact list. The function should now run for all your contacts, and you should get the desired result.


  4. Import your contacts into google contacts. Test to make sure you can import your contacts from this file back into google contacts first. To do this, save the file, and import into google contacts. If it works, and you now have a ton of duplicates, delete all of your contacts and re-import. You should now be left with only your new correct contacts.

  5. Sync these contacts to your phone! I had uncheck the box to sync with google contacts in iTunes under "Info", sync, and re-check the box. You'll get a warning that x number of contacts will be erased, and x number will be added. It's just saying that it is going to delete all your phone contacts, and add all the Google contacts you just fixed.

  6. Yay! You're done. 🙂


-Kyle

Message was edited by: KFox112

First and Last Names Reversed

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.