I do a lot of spreadsheets where the original may have a set up like this
Column A:
James Doe Jr
Jonathan Doe Jr
I need it set up with the first name in the first column and the last name and Jr put into the second column. I have tried text to columns but it puts each part of the name as separate columns and in reality, makes more work for me so instead somebody sent me this formula:
=LEFT(A1,(FIND(" ",A1)-1))&" "&IF(ISERROR(FIND(" ",A1,FIND(" ",A1)+1))," ",MID(A1,(FIND(" ",A1)+1),(FIND(" ",A1,FIND(" ",A1)+1))-(FIND(" ",A1))))
It works great except for one thing, sometimes it will put Jr with the last name or sometimes it keeps the first and last name in column A and puts Jr in it's own column so I have to go through and manually fix it which takes a lot of time when I have 8000 names or more to go through. Does anybody have any suggestions?
Also, I have a question about zip codes. I get spreadsheets that will have zipcodes where some of them have the regular zip along with the four digit extension but no dashes but it also has just the regular zip code with no extensions. So they look like this:
123451234
12345
What I am looking for is a way to put the dash in automatically and when there is no extension it puts in -0000. I have tried formatting them but instead of making the regular zip code look like: 12345-0000 it will do this:
00001-2345
Hope that makes sense. Again, it takes me a ton of time when I have to go in and manually add the dashes where they are needed. By the way I am using Excel 2003.
Any help would be appreciated.
Tracy
Column A:
James Doe Jr
Jonathan Doe Jr
I need it set up with the first name in the first column and the last name and Jr put into the second column. I have tried text to columns but it puts each part of the name as separate columns and in reality, makes more work for me so instead somebody sent me this formula:
=LEFT(A1,(FIND(" ",A1)-1))&" "&IF(ISERROR(FIND(" ",A1,FIND(" ",A1)+1))," ",MID(A1,(FIND(" ",A1)+1),(FIND(" ",A1,FIND(" ",A1)+1))-(FIND(" ",A1))))
It works great except for one thing, sometimes it will put Jr with the last name or sometimes it keeps the first and last name in column A and puts Jr in it's own column so I have to go through and manually fix it which takes a lot of time when I have 8000 names or more to go through. Does anybody have any suggestions?
Also, I have a question about zip codes. I get spreadsheets that will have zipcodes where some of them have the regular zip along with the four digit extension but no dashes but it also has just the regular zip code with no extensions. So they look like this:
123451234
12345
What I am looking for is a way to put the dash in automatically and when there is no extension it puts in -0000. I have tried formatting them but instead of making the regular zip code look like: 12345-0000 it will do this:
00001-2345
Hope that makes sense. Again, it takes me a ton of time when I have to go in and manually add the dashes where they are needed. By the way I am using Excel 2003.
Any help would be appreciated.
Tracy