+ Reply to Thread
Results 1 to 11 of 11

Split cell - bold text and non bold text.

  1. #1
    Registered User
    Join Date
    06-22-2010
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    10

    Split cell - bold text and non bold text.

    Hey,

    Ok here's the problem I have. I have a document with words and their translations, i.e :
    der Anwalt,-¨e –solicitor
    der Fahrstuhl,-¨e –lift
    fliehen-to escape

    Now the German part is in bold and the English part is not in bold, however all the words (english and german) are in one cell.

    Is there some sort of way to split the cell depending on whether or not the cell is bold ?


    Thank you in advance ^^
    Last edited by desertshift; 11-21-2010 at 07:30 PM.

  2. #2
    Registered User
    Join Date
    10-05-2010
    Location
    S.A
    MS-Off Ver
    Excel 2007
    Posts
    99

    Re: Split cell - bold text and non bold text.

    hi
    here is a vba code:
    Please Login or Register  to view this content.
    whether cell is bolded or not
    it will show true or false
    then you can make sort
    on that basis
    hopefully that help you

  3. #3
    Registered User
    Join Date
    06-22-2010
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Split cell - bold text and non bold text.

    Erm I'm a bit of a noob at this, I thought I'd get a function to put into a cell ^^', I think I managed to figure out where I'm supposed to put this code (VBA editor = module ?) , but I have no idea how I'm supposed to use this or run the module as it starts asking me for a macro when I click run and ends up putting another line in the code and searching this forum for such a simple question doesn't to be bearing any results.

    Also showing whether or not the cell is bolded or not won't help me as far as I know, as all the cells on the sheet will be bolded. What I want is for example this 1 cell : fliehen-to escape to become 2 cells fliehen | -to escape


    Any help ^^' ?

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Split cell - bold text and non bold text.

    what is the separator between german english? if its always the same you can use text to columns to split
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Registered User
    Join Date
    06-22-2010
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Split cell - bold text and non bold text.

    It's not always the same unfortunately otherwise I would have asked for that , for example sometimes it's "-" or "--" and the problem is that take this word "der Anwalt,-¨e" it has "-" in it.

    The only real separator is the fact it's bold.

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Split cell - bold text and non bold text.

    is it always ,-x when something is added on? have you some real examples in excel?
    Last edited by martindwilson; 11-21-2010 at 06:45 PM.

  7. #7
    Registered User
    Join Date
    06-22-2010
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Split cell - bold text and non bold text.

    No.. it varies

    e.g :
    die Fuβgängerzone,-n –pedestrian zone
    erleben-to experience
    kräftig - strong

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Split cell - bold text and non bold text.

    You could use a user-defined function:
    Please Login or Register  to view this content.
    Then, for example,
    Please Login or Register  to view this content.
    The formula in B2 and down is

    =LEFT(A2, BoldEnds(A2)-1)

    In C2 and down,

    =TRIM(MID(A2, BoldEnds(A2), LEN(A2)))
    Last edited by shg; 11-21-2010 at 06:53 PM.
    Entia non sunt multiplicanda sine necessitate

  9. #9
    Registered User
    Join Date
    06-22-2010
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Split cell - bold text and non bold text.

    That worked perfectly, thank you very much shg

  10. #10
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Split cell - bold text and non bold text.

    i was asking eg in these instances
    die Fuβgängerzone,-n –pedestrian zone
    erleben-to experience
    kräftig - strong
    you have
    die Fuβgängerzone,-n –pedestrian zone so there is
    Fuβgängerzone,-n
    followed by - or-- or whatever
    is that always the case when it's like that?

  11. #11
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: Split cell - bold text and non bold text.

    desertshift ,

    I assume that your raw data begins in cell A1.


    Please TEST this FIRST in a COPY of your workbook (always make a backup copy before trying new code, you never know what you might lose).


    Please Login or Register  to view this content.

    Then run the SplitBold macro.
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

+ 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