+ Reply to Thread
Results 1 to 3 of 3

Concatenate AND more... I think :-)

Hybrid View

  1. #1
    Registered User
    Join Date
    08-14-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    8

    Angry Concatenate AND more... I think :-)

    Hi All,

    This forum has been helpful in the past so here we go again.

    I am trying to extract SOME data from one cell and split it up based on a rule.

    So I have this:

    Team Members
    Business Lead: Smith, John: john.smith@example.com
    Finance Lead: Jones, Jack: jack.jones@example.com
    Project Manager: Smith, John: john.smith@example.com

    But I want this (Bold being heading, two columns of data):

    Finance Lead Business Lead
    Jack Jones John Smith

    I have attached an example excel of what I am looking for and there are two sheets.

    ANY HELP in the right direction would be fantastic.

    Cheers

    Kirban
    Attached Files Attached Files
    Last edited by Paul; 09-12-2012 at 07:05 PM.

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887

    Re: Concatenate AND more... I think :-)

    It's not pretty, but all in one formula extracting the name and then reversing it...

    For Finance Lead:
    =MID(LEFT(MID(Data!B2,FIND("Finance Lead: ",Data!B2)+14,FIND("Project Manager:",Data!B2)-1),FIND(":",MID(Data!B2,FIND("Finance Lead: ",Data!B2)+14,FIND("Project Manager:",Data!B2)-1))-1),FIND(",",LEFT(MID(Data!B2,FIND("Finance Lead: ",Data!B2)+14,FIND("Project Manager:",Data!B2)-1),FIND(":",MID(Data!B2,FIND("Finance Lead: ",Data!B2)+14,FIND("Project Manager:",Data!B2)-1))-1))+2,255)&" "&LEFT(LEFT(MID(Data!B2,FIND("Finance Lead: ",Data!B2)+14,FIND("Project Manager:",Data!B2)-1),FIND(":",MID(Data!B2,FIND("Finance Lead: ",Data!B2)+14,FIND("Project Manager:",Data!B2)-1))-1),FIND(",",LEFT(MID(Data!B2,FIND("Finance Lead: ",Data!B2)+14,FIND("Project Manager:",Data!B2)-1),FIND(":",MID(Data!B2,FIND("Finance Lead: ",Data!B2)+14,FIND("Project Manager:",Data!B2)-1))-1))-1)
    For Business Lead:
    =MID(LEFT(MID(Data!B2,FIND("Business Lead: ",Data!B2)+15,LEN(Data!B2)),FIND(":",MID(Data!B2,FIND("Business Lead: ",Data!B2)+15,LEN(Data!B2)))-1),FIND(",",LEFT(MID(Data!B2,FIND("Business Lead: ",Data!B2)+15,LEN(Data!B2)),FIND(":",MID(Data!B2,FIND("Business Lead: ",Data!B2)+15,LEN(Data!B2)))-1))+2,LEN(Data!B2))&" "&LEFT(LEFT(MID(Data!B2,FIND("Business Lead: ",Data!B2)+15,LEN(Data!B2)),FIND(":",MID(Data!B2,FIND("Business Lead: ",Data!B2)+15,LEN(Data!B2)))-1),FIND(",",LEFT(MID(Data!B2,FIND("Business Lead: ",Data!B2)+15,LEN(Data!B2)),FIND(":",MID(Data!B2,FIND("Business Lead: ",Data!B2)+15,LEN(Data!B2)))-1))-1)
    If you used helper columns the formulas could be much shorter. A macro could also pull the data by searching or using regex (which I'm terrible at). I'm sure even these formulas could be shortened a bit, since it's just referencing the same extracted string multiple times in order to find the start and end points and then reverse the names, but I don't have time at the moment.

    Hope it helps!

  3. #3
    Forum Contributor
    Join Date
    09-11-2009
    Location
    Paris
    MS-Off Ver
    Excel 2003
    Posts
    102

    Re: Concatenate AND more... I think :-)

    Salut Kirban,
    you can combine two functions Find and Mid:
    =SUBSTITUTE(MID(Data!$B$2,FIND(":",Data!$B$2,ind)+1,-FIND(":",Data!$B$2,ind)+FIND("@",Data!$B$2,ind)-1),"."," ")
    see attached file for reference:
    P/S: ind is a name
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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