+ Reply to Thread
Results 1 to 6 of 6

Text to columns - First Instance of =

  1. #1
    Registered User
    Join Date
    08-16-2004
    Posts
    19

    Text to columns - First Instance of =

    Is there any way to use Text to columns feature and only use the first equals as a delimiter?
    For example we have a spreadsheet of translations:
    Column A
    german = Deutsch
    italian = Italiano
    dropdown64 = B = Zweisprachig
    etc.

    There are thousands of rows in this spreadsheet and many of them have the equals sign in the translation.

    We would like to split this out into two columns:
    Column A
    german
    italian
    dropdown64

    Column B
    Deutsch
    Italiano
    B = Zweisprachig

    Please help.
    Thanks
    Hyyfte

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,902
    I don't think you easily can...

    you can try a couple of formulas though.

    in B1: =LEFT(A1,FIND("=",A1)-2) copied down

    in C1: =SUBSTITUTE(A1,B1& " = ","") copied down

    Then copy both columns, B and C, select B1 and paste special as Values.

    You can then delete Column A.
    Last edited by NBVC; 03-06-2007 at 11:40 AM.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    08-16-2004
    Posts
    19

    spacing before and after "=" different throughout

    just tried this and it worked well for the majority of the fields. Where I'm having trouble is when the equals sign doesn't have a space before or after.
    e.g.
    german= Deutsch
    italian = Italiano
    dropdown64 =B = Zweisprachig
    is there a way to use an OR statement with a substitute?

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,902
    Try these formulas instead:

    =LEFT(A1,FIND("=",TRIM(SUBSTITUTE(A1,"="," = ")))-2)

    and

    =SUBSTITUTE(TRIM(SUBSTITUTE(A1,"="," = ")),B1& " = ","")

    adjusting cell reference to suit.

  5. #5
    Registered User
    Join Date
    08-16-2004
    Posts
    19
    This takes care of the first "=" but adds spaces when there are multiple "="s

    adjustrpt23 = {0} Für Privatzwecke {1}<br><span class=\"small\"><i>Berechnet zu {2}/Einheit ({3})</i></span>

    splits to

    B:adjustrpt23
    C:{0} Für Privatzwecke {1}<br><span class = \"small\"><i>Berechnet zu {2}/Einheit ({3})</i></span>

    with spaces before and after the "=" after class.

    How do we apply this to only the first equals?

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,902
    Change the second formula to:

    =SUBSTITUTE(TRIM(SUBSTITUTE(A1,"="," = ",1)),B1& " = ","")

+ 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