+ Reply to Thread
Results 1 to 12 of 12

Add characters between lower case and upper case letters

  1. #1
    Registered User
    Join Date
    08-26-2009
    Location
    Salt Lake City, Utah
    MS-Off Ver
    Excel 2003
    Posts
    21

    Add characters between lower case and upper case letters

    I have a string of names that run together without spaces or commas between each name.

    "Danny TrejoJean Claude van DammeVincent SchiavelliGabrielle FitzpatrickDavid 'Shark' FralickPat Morita" for example.

    Is there a way to add a comma and space between a lower case and upper case letter?
    Last edited by Johnf42; 09-15-2009 at 12:03 AM.

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

    re: Add characters between lower case and upper case letters

    at a guess i'd say no!
    unless someone knows how to parse it using vba
    "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

  3. #3
    Registered User
    Join Date
    08-26-2009
    Location
    Salt Lake City, Utah
    MS-Off Ver
    Excel 2003
    Posts
    21

    re: Add characters between lower case and upper case letters

    Thanks for your reply.

  4. #4
    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: Add characters between lower case and upper case letters

    If you first use text to columns to separate by spaces, then on the result, use this ugly formula:

    =LEFT(A3, MATCH(TRUE, CODE(MID(A3, ROW(INDIRECT("2:" & LEN(A3)) ), 1) ) <= 90, 0)) & ", " & MID(A3, MATCH(TRUE, CODE(MID(A3, ROW(INDIRECT("2:" & LEN(A3)) ), 1) ) <= 90, 0) + 1, 99)

    The formula MUST be confirmed with Ctrl+Shift+Enter instead of just Enter.
    Entia non sunt multiplicanda sine necessitate

  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: Add characters between lower case and upper case letters

    just that i thought result would be
    Danny | Trejo, Jean | Claude |van| Damme, Vincent |Schiavelli, Gabrielle| Fitzpatrick, David| 'Shark' |Fralick, Pat| Morita

  6. #6
    Registered User
    Join Date
    08-26-2009
    Location
    Salt Lake City, Utah
    MS-Off Ver
    Excel 2003
    Posts
    21

    re: Add characters between lower case and upper case letters

    Wow, that's a monster of a formula. I appreciate the time you took to post it, your formula skills are far beyond mine.

    Is the formula cell dependent, or can I apply it to any given cell in the spreadsheet? I got a number of various results that didn't relate to the cells that I applied it to.

  7. #7
    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: Add characters between lower case and upper case letters

    It can be applied to any cell, but note there are six references, and they all have to change.

  8. #8
    Registered User
    Join Date
    08-26-2009
    Location
    Salt Lake City, Utah
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: Add characters between lower case and upper case letters

    I assume that A3 is the reference, correct?

    I changed the reference cell and pasted the entire formula into the formula bar on top, but it's not working. Am I entering the formula in the wrong spot?

    Thanks

  9. #9
    Registered User
    Join Date
    01-18-2014
    Location
    Bucharest, Romania
    MS-Off Ver
    Excel 2003, Excel 2013
    Posts
    2

    Re: Add characters between lower case and upper case letters

    Long live The Great State of Texas !

    Dear sir can you please tell me how to adapt your formula to put a space(or any distinctive character like '|' , '*', etc.) on a Excel string who has this form: 'AbcDefgHijklmnopRs'.
    The result I need will look like this:'Abc Defg Hijklmnop Rs'.

    I am using Excel 2003 (but if you can please tell me also for 2010)

    Thank you !

  10. #10
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Add characters between lower case and upper case letters

    Wrong canned reply
    Last edited by Pepe Le Mokko; 01-18-2014 at 12:55 PM.

  11. #11
    Registered User
    Join Date
    01-18-2014
    Location
    Bucharest, Romania
    MS-Off Ver
    Excel 2003, Excel 2013
    Posts
    2

    Re: Add characters between lower case and upper case letters

    Quote Originally Posted by Pepe Le Mokko View Post
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Regarding to the rule you mentioned: I have no code to post, as I said initially I asked about a modification of an EXCEL formula posted above, not VBA.
    Thank you for your contribution.

  12. #12
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Add characters between lower case and upper case letters

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.

+ 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