• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

text string update|General Excel Questions & Answers|Excel Forum|My Online Training Hub

You are here: Home / text string update|General Excel Questions & Answers|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumGeneral Excel Questions & Answe…text string update
sp_PrintTopic sp_TopicIcon
text string update
Avatar
Joseph Horling
Member
Members
Level 0
Forum Posts: 15
Member Since:
June 24, 2018
sp_UserOfflineSmall Offline
1
April 30, 2020 - 11:01 pm
sp_Permalink sp_Print

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.

Avatar
Purfleet
England
Member
Members


Trusted Members
Level 4
Forum Posts: 412
Member Since:
December 20, 2019
sp_UserOfflineSmall Offline
2
May 1, 2020 - 4:06 am
sp_Permalink sp_Print sp_EditHistory

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

Avatar
Joseph Horling
Member
Members
Level 0
Forum Posts: 15
Member Since:
June 24, 2018
sp_UserOfflineSmall Offline
3
May 1, 2020 - 10:45 pm
sp_Permalink sp_Print

Great, thanks for trying Purfleet.   Appreciate the help.  

Avatar
Joseph Horling
Member
Members
Level 0
Forum Posts: 15
Member Since:
June 24, 2018
sp_UserOfflineSmall Offline
4
May 2, 2020 - 6:05 am
sp_Permalink sp_Print

Hi Purfleet,

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

Avatar
Anders Sehlstedt
Eskilstuna, Sweden

VIP
Members


Trusted Members
Level 3
Forum Posts: 871
Member Since:
December 7, 2016
sp_UserOfflineSmall Offline
5
May 2, 2020 - 7:03 am
sp_Permalink sp_Print

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

The following users say thank you to Anders Sehlstedt for this useful post:

Purfleet
Avatar
Joseph Horling
Member
Members
Level 0
Forum Posts: 15
Member Since:
June 24, 2018
sp_UserOfflineSmall Offline
6
May 2, 2020 - 11:41 pm
sp_Permalink sp_Print

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

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: dan conner, Emma Klonowski
Guest(s) 11
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 871
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
Jessica Stewart: 204
A.Maurizio: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
Brett Dryland
Saeed Aldousari
Bhuwan Devkota
Kathryn Patton
Maria Conatser
Jefferson Granemann
Glen Coulthard
Nikki Fox
Rachele Dickie
Raj Mattoo
Forum Stats:
Groups: 3
Forums: 24
Topics: 6222
Posts: 27291

 

Member Stats:
Guest Posters: 49
Members: 31912
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.