+ Reply to Thread
Results 1 to 4 of 4

Split String From A Cell Based On Multiple Criteria

Hybrid View

  1. #1
    Registered User
    Join Date
    04-30-2011
    Location
    Indian, TN
    MS-Off Ver
    Excel 2007
    Posts
    37

    Split String From A Cell Based On Multiple Criteria

    Hi Excel Masters,

    Please provide you support in solving my below challenge with creating a formula fused with three criteria.

    Say if the cells:
    A1 = 3AB LT00022788 TH0000243428 JACKSON,LUCAS A 02/19/98 701-483-3456
    A2 = 3AB LT00022788 TH0000243428 JACKSON,LUCAS B 02/19/98 701-483-3456
    A3 = 3AB LT00022788 TH0000243428 JACKSON,LUCAS TC 02/19/98 701-483-3456

    And When I put the below formulae in B1, B2 & B3:
    =LEFT(A1,FIND(" A ",A1,1)-1)
    =LEFT(A2,FIND(" B ",A1,1)-1)
    =LEFT(A3,FIND(" TC ",A1,1)-1)

    The resultant would be:
    B1= 3AB LT00022788 TH0000243428 JACKSON,LUCAS
    B2= 3AB LT00022788 TH0000243428 JACKSON,LUCAS
    B3= 3AB LT00022788 TH0000243428 JACKSON,LUCAS

    Challenge is to put a common formula that I can drag down from B1 to B3 that should give the above results.

    Thanks in advance!!

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Split String From A Cell Based On Multiple Criteria

    if the format is consistent throughout, or at least regarding the date positioning, you could use something like this....

    =LEFT(A1,SEARCH("/",A1,1)-6)

    an alternative might also be to use text-to-columns, based on "fixed width", remove all-but-1 of the dividers, and then position that where you want it
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: Split String From A Cell Based On Multiple Criteria

    B1: =left(a1,find(" ",a1,find(",",a1)))

  4. #4
    Registered User
    Join Date
    04-30-2011
    Location
    Indian, TN
    MS-Off Ver
    Excel 2007
    Posts
    37

    Re: Split String From A Cell Based On Multiple Criteria

    Thank you for the response. But the main problem is that the data is not consistent as its manually entered by multiple users. The form contains the below fields to be entered and users type it all differently leaving few fields blank most of the times.

    TYPE/ID#/ACCT#/NAME/CAT/DOB/HOMEPHONE/WORK PHONE/CO APPL/PRI LOAN

    Sample:
    3AB LT00022788 TH0000243428 JACK,LUC A 02/19/98 701-483-3456 701-483-3456 Andy,Pat USA
    3AB LT00022788 TH0000243428 JACKSON,LUCAS B 02/19/98 701-483-3456 USA
    3AB LT00022788 TH0000243428 JACKSON,LUCAS TC 02/19/98 701-483-3456 701-483-3456
    3AB LT00022788 TH0000243428 JACKSON,LUCAS C 02/19/98 USA
    3AB LT00022788 TH0000243428 JACKSON,LUCAS IF 02/19/98 Andy,Patricia
    3AB LT00022788 TH0000243428 STEINER,CORBAN PAUL G USA

    I have to manually segregate the data based on the above headers and I was trying to find a workaround wherein I can put some formulas in place so that the relevant data sits in the corresponding columns automatically. Please advise.

+ 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