+ Reply to Thread
Results 1 to 5 of 5

How do I move characters within a string? Or how do I recognize them?

  1. #1
    Forum Contributor
    Join Date
    04-11-2011
    Location
    Columbus, Ohio
    MS-Off Ver
    Excel 2007
    Posts
    325

    How do I move characters within a string? Or how do I recognize them?

    If I have a cell with a string, like 123AB, is there a way I can use a macro to move the letters to the front of the string?

    Please Login or Register  to view this content.
    So does anyone know how to do this? The format is generally the same but could slightly vary.

    123AB
    123A
    12AB
    1AB
    etc.

    But the end result does the same thing to each value.

    AB123
    A123
    AB12
    AB1
    etc.

    I appreciate your guys help.
    Last edited by 111StepsAhead; 12-02-2011 at 12:35 PM.

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: How do I move characters within a string? Or how do I recognize them?

    Is a formula solution ok? ( see attached)
    Attached Files Attached Files

  3. #3
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: How do I move characters within a string? Or how do I recognize them?

    Or VBA:

    Please Login or Register  to view this content.

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  4. #4
    Forum Contributor
    Join Date
    04-11-2011
    Location
    Columbus, Ohio
    MS-Off Ver
    Excel 2007
    Posts
    325

    Re: How do I move characters within a string? Or how do I recognize them?

    This was the final solution. Thanks Domski for your time.

    Please Login or Register  to view this content.

  5. #5
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: How do I move characters within a string? Or how do I recognize them?

    Another approach:
    Please Login or Register  to view this content.

+ 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