+ Reply to Thread
Results 1 to 4 of 4

Split data with labels when labels are not in the same order

  1. #1
    Registered User
    Join Date
    03-07-2013
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2007/2010, Outlook 2007/2010
    Posts
    60

    Split data with labels when labels are not in the same order

    I'm pulling data from my email to Excel with VBA. Attached is an example of the output. There are several labels, but they don't come in any consistent order. They are:
    first_name :
    last_name :
    type_service :
    phone :
    starting_date :
    email :
    [zip : ]
    Affiliationidcontact :

    The format of each label is consistent - label[space]:[space]. I need to separate the data into columns. If it's better to do it in the VBA itself, that's fine. If it's better to do it formulaically after import, that's fine.
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,791

    Re: Split data with labels when labels are not in the same order

    You can put this formula in C2:

    =IF(ISNUMBER(SEARCH(C$1,$B2)),MID($B2,SEARCH(C$1,$B2)+LEN(C$1)+3,FIND(CHAR(10),$B2&CHAR(10),SEARCH(C$1,$B2))-(SEARCH(C$1,$B2)+LEN(C$1)+3)),"")

    then copy it across into D2:F2, then copy those 4 formulae down as far as you need them.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    03-07-2013
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2007/2010, Outlook 2007/2010
    Posts
    60

    Re: Split data with labels when labels are not in the same order

    That's perfect, thank you!

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,791

    Re: Split data with labels when labels are not in the same order

    That's good to hear. Thanks for the rep.

    If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post in this thread, and mark the thread as SOLVED.

    Pete

+ 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. Replies: 6
    Last Post: 10-24-2018, 09:04 AM
  2. Mail Merge from excel file for labels not populating labels
    By rcdavis28 in forum Word Formatting & General
    Replies: 1
    Last Post: 10-15-2016, 03:06 PM
  3. [SOLVED] Excel-13 Add values in array matching specific row labels, column labels within date range
    By fadeoutagain27 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-18-2014, 03:55 PM
  4. Replies: 2
    Last Post: 04-05-2014, 06:46 PM
  5. Change chart/pivot table numeric labels to associated text labels
    By petschek in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-07-2014, 05:32 PM
  6. Replies: 0
    Last Post: 07-03-2012, 11:09 AM
  7. Replies: 2
    Last Post: 02-17-2011, 02:13 AM

Tags for this Thread

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