+ Reply to Thread
Results 1 to 7 of 7

Need two times parsed from single cell and name parsed to first name last initial.

  1. #1
    Registered User
    Join Date
    05-04-2015
    Location
    California
    MS-Off Ver
    2013
    Posts
    3

    Need two times parsed from single cell and name parsed to first name last initial.

    I have an Excel 2013 file with two work sheets. One contains a single field for employee name and another a start and end time. I need to get the start and end times parsed out to single fields with correct formatting and need the employees full name parsed to just first name and last initial. Employee names in cells only have two variations, one is LAST, FIRST ex. "Smith, James" the other is LAST, FIRST MIDDLE ex. "Smith, James Michael". There is always a space after the comma and the first name is always directly to the right of that space. I need a way to get that onto a second worksheet formatted down to "James S."

    The second field giving me a problem is the times. Our system formats them as four digit with AM/PM ex. " 09:00AM-02:15PM". For some reason the software outputs it with a leading space. I need a way to get the first time out into a single field formatted in a way that Excel recognizes it as a time and the same for the second field. The second time stamp always directly proceeds the dash.

    Any help you guys can give in helping me finish this project is greatly appreciated!

    The attached file has on the left the exact format as our scheduling system dumps it, lead spaces and all. On the right is the format my boss wants it in.
    Attached Files Attached Files
    Last edited by GreggW; 05-05-2015 at 01:07 AM. Reason: Added attachment and attachment description as requested.

  2. #2
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,372

    Re: Need two times parsed from single cell and name parsed to first name last initial.

    Can you post/upload your sample excel woorkbook at the forum? with manually type for the expected results? Click on "Go Advanced" button and find paperclip image button to attach it.........

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,407

    Re: Need two times parsed from single cell and name parsed to first name last initial.

    Try this name parsing formula in D6 and fill down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Then in E6 this formula filled down and across to column F.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    You will need to set the Excel formatting h:mm AM/PM.


    Edited Found (another) mistake in name parsing formula.
    Last edited by FlameRetired; 05-05-2015 at 12:59 AM.

  4. #4
    Registered User
    Join Date
    05-04-2015
    Location
    California
    MS-Off Ver
    2013
    Posts
    3

    Re: Need two times parsed from single cell and name parsed to first name last initial.

    That's nearly perfect, time part is working exactly. The name is getting caught up on Middle names. So when a middle name is present it's doing MiddleName LastInitial instead of FirstName LastInitial.

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,407

    Re: Need two times parsed from single cell and name parsed to first name last initial.

    Quote Originally Posted by GreggW View Post
    That's nearly perfect, time part is working exactly. The name is getting caught up on Middle names. So when a middle name is present it's doing MiddleName LastInitial instead of FirstName LastInitial.
    Yes. I had misinterpreted. Edited my formula a bazillion times. I believe you'll find it works, now. Apologies.

  6. #6
    Registered User
    Join Date
    05-04-2015
    Location
    California
    MS-Off Ver
    2013
    Posts
    3

    Re: Need two times parsed from single cell and name parsed to first name last initial.

    No need to apologize it's perfect. You have saved an enormous headache with my boss thank you!

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,407

    Re: Need two times parsed from single cell and name parsed to first name last initial.

    You're welcome. Glad it works....and thanks for the rep.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Inconsistent spaced data that I need parsed into separate columns
    By dklesper2012 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-10-2013, 04:01 PM
  2. Vlookup won't work on parsed strings pulled from Outlook emails
    By bnasty in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-31-2012, 01:27 PM
  3. Replies: 7
    Last Post: 08-25-2012, 12:53 PM
  4. Sorting Parsed Text
    By scotfitz in forum Excel General
    Replies: 8
    Last Post: 01-09-2009, 11:51 AM
  5. Moving Parsed Text from Rows to Columns
    By dab in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-24-2006, 10:30 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1