+ Reply to Thread
Results 1 to 5 of 5

Converting Text Strings

  1. #1
    Registered User
    Join Date
    05-26-2011
    Location
    Newcastle
    MS-Off Ver
    Excel 2007
    Posts
    22

    Converting Text Strings

    Morning all,

    Yesterday I posed a question which is proving to be difficult to code, however last night I had a brain wave on how I could do it, however now I need some help coding the idea!

    I have a spreadsheet C5:DD22, which contains data in the following format:

    Linda+1; George+2; Albert+4
    Albert+3
    George+4; Albert+6
    Linda+1; Albert+4
    Linda+3; George+2; Albert+5

    The names Linda, George, Albert appear in that order always. The only exception to this is if the name does not appear at all, i.e. Albert+3 and nothing else.

    I would like a function that converts these five examples, into the following text strings:

    Linda+1; George+2; Albert+4
    Linda+0; George+0; Albert+3
    Linda+0; George+4; Albert+6
    Linda+1; George+0; Albert+4
    Linda+3; George+2; Albert+5

    Many thanks in advance!

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Converting Text Strings

    Can you please post a workbook with the data? There's no way of telling if these values are in a single cell or spread across the row.

    Also, mock up the expected results in the sample file, so we know what to compare our suggestions with.

  3. #3
    Registered User
    Join Date
    05-26-2011
    Location
    Newcastle
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Converting Text Strings

    Many thanks teylyn for resonding so quickly.

    I have attached a spreadsheet which contains the raw data and an example of the output required.

    Cheers,
    Attached Files Attached Files

  4. #4
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Converting Text Strings

    Try in E5 and copy down

    Please Login or Register  to view this content.

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

    Re: Converting Text Strings

    why do you insist on them being in one cell its illogical!
    "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

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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