Power BI separate first and last name

Splitting Names From Suffixes

Data cleansing and prep can come to you in any manner and that’s why I often compare it to bull-riding: you’ve got to get on and deal with whatever happens.

In this video, we need to split the names apart from suffixes like: III, DDS, EdD, etc. This happens when you need a list for one purpose but the best source data that you can get your hands on was used for a very different purpose.

Power BI separate first and last name

There are plenty of ways to split the names from the suffixes. Text-to-Columns is the first that comes to mind, however, it will create a mess (as I describe in the video).

Power Query’s ‘split column’ feature is the way to go! We can tell Excel to split the column at the very first comma.

Also, check out Denise McInerny’s comment about the synergy between Excel users and the SQL community. We’re all having to deal with challenges like this. So, check it out and save yourself some time and heartache.

Bonus Downloads

pq-column-splitting-exceltv-example <—– Download the file that Oz used in the video

What’s next?

Have you tried Power Query?  Need some guidance?  Leave your comments below.

Tags

Denise McInerny, Excel Hot Tip, Power query, split columns, tables

You may also like

Free Power User Quick Guide

Discover The BEST Ways To Use Lookups And Conditional Calculations Quickly And Easily With This Reference Guide -- You Won’t Want This To Leave Your Side

With so many ways to use Excel, it can be difficult to memorize all of the key functions, calculations, and techniques you can employ to meet your goal: simply get the job done.

Power BI separate first and last name

Skip to content

  • Home
  • Amazing Power BI
    • Microsoft Power BI Perth
      • Power BI Training
      • How to use Power BI
      • Microsoft Power BI Desktop
    • Microsoft Power Query
    • Microsoft Power Pivot
    • Solver Corporate Performance Management
    • ValQ – Modern Visual Planning
    • Inforiver
    • Zebra Power BI Visuals
    • Success Stories
  • Amazing Excel
    • Overview
    • Financial Modelling
    • Excel Dashboards & Reports
    • Spreadsheet Auditing
    • Spreadsheet Re-engineering
    • Success Stories
    • How To Engage Us
  • Insightful Training
    • In-house Training
    • Course List
    • Course Calendar
    • Online Training >
      • Online Power Query & DAX Training
      • Free Online Financial Modelling Training
      • Online Power BI & Excel Training
    • Excel & Power BI Mentoring / Coaching
    • Enquiry
    • Event Producers’ FAQ
  • Resources
    • Overview
    • Free Templates & Downloads >
      • Templates & Downloads
      • Invest For Excel
      • Spreadsheet Detective
    • White Papers & eBooks >
      • Free White Papers & eBooks
      • Complete VBA Style Guide
    • Free Tests
    • Excel & Power BI Newsletter
    • Links
    • Recommended Books
  • Blog
  • About Us
    • Who we are
    • Contact Us
    • Corporate Social Responsibility
    • Careers
    • Pay My Invoice
  • Cart
  • Home
  • Amazing Power BI
    • Microsoft Power BI Perth
      • Power BI Training
      • How to use Power BI
      • Microsoft Power BI Desktop
    • Microsoft Power Query
    • Microsoft Power Pivot
    • Solver Corporate Performance Management
    • ValQ – Modern Visual Planning
    • Inforiver
    • Zebra Power BI Visuals
    • Success Stories
  • Amazing Excel
    • Overview
    • Financial Modelling
    • Excel Dashboards & Reports
    • Spreadsheet Auditing
    • Spreadsheet Re-engineering
    • Success Stories
    • How To Engage Us
  • Insightful Training
    • In-house Training
    • Course List
    • Course Calendar
    • Online Training >
      • Online Power Query & DAX Training
      • Free Online Financial Modelling Training
      • Online Power BI & Excel Training
    • Excel & Power BI Mentoring / Coaching
    • Enquiry
    • Event Producers’ FAQ
  • Resources
    • Overview
    • Free Templates & Downloads >
      • Templates & Downloads
      • Invest For Excel
      • Spreadsheet Detective
    • White Papers & eBooks >
      • Free White Papers & eBooks
      • Complete VBA Style Guide
    • Free Tests
    • Excel & Power BI Newsletter
    • Links
    • Recommended Books
  • Blog
  • About Us
    • Who we are
    • Contact Us
    • Corporate Social Responsibility
    • Careers
    • Pay My Invoice
  • Cart

 Split First And Last Name Formula

Split first and last name formula

I have a column of cells with names in the format John, Smith. I need to split them into first name and second name?

By Neale Blackwood

Assuming the name is in cell A1 the following formulae will extract the first and second names:

First name formula =LEFT(A1,SEARCH(“,”,A1)-1)

Second name formula =TRIM(RIGHT(A1,LEN(A1)-SEARCH(“,”,A1)))

You could also use Excel’s ‘Text to Columns’ feature in the Data menu. This allows you to split the contents of cells based on commas, spaces, semi-colons or another character that you specify.

In the above example you would select the range that had the names then click the Data menu, select ‘Text to Columns’, ensure the Delimited option is selected and click ‘Next’. Select the ‘Space’ and ‘comma’ options and Click ‘Next’. Select the ‘Space’ and ‘Comma’ options and Click ‘Next’ and ‘Next’ again.


Extras

When using the Text To Columns feature it is a good idea not to have entries in cells to the right of the column being split as they may be overwritten.

In Excel 2007 the Text To Columns icon is in the Data Ribbon tab in the Data Tools section.

Share This Story, Choose Your Platform!