Forum

Notifications
Clear all

text string update

6 Posts
3 Users
0 Reactions
64 Views
(@jman2018)
Posts: 15
Eminent Member
Topic starter
 

Hi My Online Training Experts, 

Hope you are all safe and well.  I think you looked at this before, not sure if you did, but I need to add a few things to the text string in the A column.  Can you adjust the formulas so it would add a Title in the first column?  When I added the title column everything gets all jumbo up.  Also, can you add a hyphen in between the two last names?  And a comma between last name and Jr., II, III, etc.  Not sure if you can do those things in the same column.  Thanks for your help.   Joe from Michigan.

 
Posted : 01/05/2020 9:01 am
(@purfleet)
Posts: 412
Reputable Member
 

You data isnt in the best format for this type of work.

As a bodge you could use =IFERROR(IF(SEARCH(".",A14)<5,LEFT(A14,SEARCH(".",A14)),""),"") to get a title, but its not perfect

We can find the end of the last name with this =AGGREGATE(15,6,SEARCH({0,1,2,3,4,5,6,7,8,9},A14),1), but then we get a problem with not knowing if they have a double barrelled name, a middle name/initital or a suffix.

You can get a first name (more or less) with =LEFT(C14,SEARCH(" ",C14))

I dont think you can ever get this perfect, so i would go with =TRIM(MID(A14,LEN(B14)+1,AGGREGATE(15,6,SEARCH({0,1,2,3,4,5,6,7,8,9},A14),1)-LEN(B14)-1)) to find thier whole name 

Purfleet

 
Posted : 01/05/2020 2:06 pm
(@jman2018)
Posts: 15
Eminent Member
Topic starter
 

Great, thanks for trying Purfleet.   Appreciate the help.  

 
Posted : 02/05/2020 8:45 am
(@jman2018)
Posts: 15
Eminent Member
Topic starter
 

Hi Purfleet,

How could I set up my data to make it more easier to split it apart?5

 
Posted : 02/05/2020 4:05 pm
Anders Sehlstedt
(@sehlsan)
Posts: 970
Prominent Member
 

Hello,

A few suggestions, depending on how the data is coming in to this Excel file.

If typed in then it is of course better and easier to type the data direct to related column.
If imported from a text file, then a comma separated list of data would be good.
If pasted in from another source and if you are able to decide the format, I suggest a comma separated format.

Example:
Title, First name, Middle name, Last name, Address, Town, State, Zip
Ms., Ann, , Mullins Horling, 18794 Jamestown Circle, Northville, Michigan, 48168

With a comma separated list you know that the comma is the character that separates the data. You can use whatever character you want as a separator, the comma is more or less the standard. Having a mixed set of characters as separators as shown in your sample file makes things more difficult.

If you are importing the data from files, text or other Excel files, then I suggest you use Power Query. Here you can read more on how to start using PQ.

Br,
Anders

 
Posted : 02/05/2020 5:03 pm
(@jman2018)
Posts: 15
Eminent Member
Topic starter
 

Thank you for your reply Anders.  I'll do that and see how that goes.

 
Posted : 03/05/2020 9:41 am
Share: