+ Reply to Thread
Results 1 to 4 of 4

Incrementing a string of letters in a cell

  1. #1
    Registered User
    Join Date
    07-13-2010
    Location
    KY
    MS-Off Ver
    Excel 2003
    Posts
    4

    Incrementing a string of letters in a cell

    Hello All,

    I would like to take the value of any cell and be able to increase the value of each character by one.

    I currently need this to work with letters only.

    Here is my example... [azbycx] changes to [baczdy].

    Thanks,

    pmw
    Last edited by pimpmyworksheet; 07-14-2010 at 02:34 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Incrementing a string of letters in a cell

    Hello pmw,

    Welcome to the Forum!

    Here is an example VBA macro to increment only letters. You didn't say how you plan to use this, so I couldn't customize it.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    07-13-2010
    Location
    KY
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Incrementing a string of letters in a cell

    Thanks so much for your help!

    This is what I was looking for but as you said I didn't specify how I wanted to use it.

    What I want to be able to do is select a cell(s) and run this macro and have it change the selected cell(s) to the output of this script.

    So if I selected cell A1 and it's contents were "abc" and then ran this script on that selected cell it would change the contents to "bcd".

    Thanks!

    pmw

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Incrementing a string of letters in a cell

    Hello ,

    I revised the macro to operate on the active cell.
    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