Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2023
    Posts
    2

    splitting firstname and last name separated by a column where one is potentially blank

    I have data that looks like this

    Employee Name
    Smith, Jim
    Smith


    ,Jim
    Smith, Jim - Worley

    I am trying to create a field calculation that would return a first and last name like this

    Last Name First Name
    Smith Jim
    Smith
    Jim
    Smith Jim - Worley

    Trying things like Right([LineItem_query].[TheOwner],Len([LineItem_query].[TheOwner])-InStr([LineItem_query].[TheOwner],',')) but not getting all the values returning

    Any help would be appreciated.

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    Looks like all you are doing is removing the comma so use the replace function. You might also want to Google the split function

  3. #3
    Join Date
    Sep 2023
    Posts
    2
    Quote Originally Posted by CJ_London View Post
    Looks like all you are doing is removing the comma so use the replace function. You might also want to Google the split function
    I will look into the split function...thanks

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 10
    Last Post: 07-28-2023, 02:47 PM
  2. Replies: 14
    Last Post: 05-05-2019, 04:37 AM
  3. Displaying data if potentially null
    By mpreston14 in forum Queries
    Replies: 5
    Last Post: 10-07-2013, 10:44 AM
  4. Replies: 4
    Last Post: 05-30-2012, 12:49 PM
  5. Replies: 4
    Last Post: 09-06-2011, 01:00 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums