+ Reply to Thread
Results 1 to 6 of 6

Taking partial text from a range of cells, cutting it, and pasting it elsewhere

  1. #1
    Forum Contributor
    Join Date
    04-30-2008
    Posts
    105

    Taking partial text from a range of cells, cutting it, and pasting it elsewhere

    I have a row of cells laid out in this format:

    Column A will have cells with data in this particular format:
    042071 ITMS WO 001

    I would like to take all of the text after the first 6 characters (in this case it'd be 040271, the first six characters will always be numbers if that helps any), cut it, and paste it into the cell next to it (column B).

    Is there a macro that would allow this?

    Also, all of these cells in column A are merged cells so I suppose I'd have to unmerge the cells too before I can paste the necessary text into column B.

    Thanks in advance for the help!

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    You could use the RIGHT function to take out the relevant characters. Do you specifically need a macro, or can the function approach work? If you really need them to be text, then you can copy / paste values the output.

    rylo

  3. #3
    Forum Contributor
    Join Date
    04-30-2008
    Posts
    105
    Quote Originally Posted by rylo
    Hi

    You could use the RIGHT function to take out the relevant characters. Do you specifically need a macro, or can the function approach work? If you really need them to be text, then you can copy / paste values the output.

    rylo
    Yeah there has to be a macro for this. I wish I could just use the function approach. The right function won't really work because the number of characters to the right of the first 6 characters varies.

  4. #4
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    Try this

    Please Login or Register  to view this content.
    I've used the RIGHT function and you could have taken the same approach using functions directly.

    rylo

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834
    try
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    04-30-2008
    Posts
    105
    Thanks for all of the help guys. I ended up using Excel's "Text to Column" feature in order to get it to work. My code asked the user to input the range where the user wanted to split the text. Heres what I got:

    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