+ Reply to Thread
Results 1 to 4 of 4

sorting data with ;

  1. #1
    jason2444
    Guest

    sorting data with ;

    have a file in one column each cell has something like this V8; 5.4;
    GAS;FI;MFI;S;3;
    need to write a formula in another cell to get V8; 5.4; GAS how do I get it
    to grab everything to the left of the 3rd ;

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    to the left:

    =MID(A1,1,FIND(";",MID(A1,FIND(";",MID(A1,FIND(";",A1),99))+1,99))+FIND(";",MID(A1,FIND(";",A1)+1,99))+FIND(";",A1)+1)

    to the right:

    =MID(A1,FIND(";",MID(A1,FIND(";",MID(A1,FIND(";",A1),99))+1,99))+FIND(";",MID(A1,FIND(";",A1)+1,99))+FIND(";",A1)+3,99)


    or you could select the column and do Data, Text to Columns, delimited on ; and then join the relavant cells together

    --

    Quote Originally Posted by jason2444
    have a file in one column each cell has something like this V8; 5.4;
    GAS;FI;MFI;S;3;
    need to write a formula in another cell to get V8; 5.4; GAS how do I get it
    to grab everything to the left of the 3rd ;
    Last edited by Bryan Hessey; 04-11-2006 at 05:34 PM.

  3. #3
    jason2444
    Guest

    Re: sorting data with ;

    I need it to only grab everything to the left of the specified ; without
    setting a number of characters to grab after the ;
    because I will need different amount of characters per line
    V8; 5.7; GAS;CARB;4BBL;N;J; V8; 5.7; GAS
    V8; 5.7; Diesel;CARB;4BBL;N;J; V8; 5.7; Die

    can this be done?

    "Bryan Hessey" wrote:

    >
    > to the left:
    >
    >
    > =MID(A1,1,FIND(";",MID(A1,FIND(";",MID(A1,FIND(";",A1),99))+1,99))+FIND(";",MID(A1,FIND(";",A1)+1,99))+FIND(";",A1)+1)
    >
    > to the right:
    >
    >
    > =MID(A1,FIND(";",MID(A1,FIND(";",MID(A1,FIND(";",A1),99))+1,99))+FIND(";",MID(A1,FIND(";",A1)+1,99))+FIND(";",A1)+3,99)
    >
    >
    > or you could select the column and do Data, Text to Columns, delimited
    > on ; and then join the relavant cells together
    >
    > --
    >
    > jason2444 Wrote:
    > > have a file in one column each cell has something like this V8; 5.4;
    > > GAS;FI;MFI;S;3;
    > > need to write a formula in another cell to get V8; 5.4; GAS how do I
    > > get it
    > > to grab everything to the left of the 3rd ;

    >
    >
    > --
    > Bryan Hessey
    > ------------------------------------------------------------------------
    > Bryan Hessey's Profile: http://www.excelforum.com/member.php...o&userid=21059
    > View this thread: http://www.excelforum.com/showthread...hreadid=532067
    >
    >


  4. #4
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    In the column that you wish the result to be, (say column D)

    in cell D1 post the formula shown for 'to the left' - ie:

    =MID(A1,1,FIND(";",MID(A1,FIND(";",MID(A1,FIND(";" ,A1),99))+1,99))+FIND(";",MID(A1,FIND(";",A1)+1,99 ))+FIND(";",A1)+1)

    and formula-drag this to the end of your data

    this should provide what you want.

    --


    Quote Originally Posted by jason2444
    I need it to only grab everything to the left of the specified ; without
    setting a number of characters to grab after the ;
    because I will need different amount of characters per line
    V8; 5.7; GAS;CARB;4BBL;N;J; V8; 5.7; GAS
    V8; 5.7; Diesel;CARB;4BBL;N;J; V8; 5.7; Die

    can this be done?

    "Bryan Hessey" wrote:

    >
    > to the left:
    >
    >
    > =MID(A1,1,FIND(";",MID(A1,FIND(";",MID(A1,FIND(";",A1),99))+1,99))+FIND(";",MID(A1,FIND(";",A1)+1,99))+FIND(";",A1)+1)
    >
    > to the right:
    >
    >
    > =MID(A1,FIND(";",MID(A1,FIND(";",MID(A1,FIND(";",A1),99))+1,99))+FIND(";",MID(A1,FIND(";",A1)+1,99))+FIND(";",A1)+3,99)
    >
    >
    > or you could select the column and do Data, Text to Columns, delimited
    > on ; and then join the relavant cells together
    >
    > --
    >
    > jason2444 Wrote:
    > > have a file in one column each cell has something like this V8; 5.4;
    > > GAS;FI;MFI;S;3;
    > > need to write a formula in another cell to get V8; 5.4; GAS how do I
    > > get it
    > > to grab everything to the left of the 3rd ;

    >
    >
    > --
    > Bryan Hessey
    > ------------------------------------------------------------------------
    > Bryan Hessey's Profile: http://www.excelforum.com/member.php...o&userid=21059
    > View this thread: http://www.excelforum.com/showthread...hreadid=532067
    >
    >

+ 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