+ Reply to Thread
Results 1 to 16 of 16

Cut specific text from cells and paste in neighbour cell

  1. #1
    Registered User
    Join Date
    02-02-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    46

    Cut specific text from cells and paste in neighbour cell

    Hi guys,

    I'd appreciate if you can help me with the following issue.

    I have a Column (A). In that column I have about 10000 cells with different data. Some of the cells contain specific text (not the only text in the cell) which I want to automatically have cut and paste in the neighbour cell. So let's say I have the text "pridon1" in cell A33, I want this text cut from the cell A33 and have it pasted into B33. Can you help me please?

  2. #2
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Cut specific text from cells and paste in neighbour cell

    The VBA Instr function will do that..... If you want me to write you a quick looping sub you'll have to upload your workbook.
    Elegant Simplicity............. Not Always

  3. #3
    Registered User
    Join Date
    02-02-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Cut specific text from cells and paste in neighbour cell

    Hi Andy, here is the sample attachment, thank you so much
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Cut specific text from cells and paste in neighbour cell

    I'll get right on it ........... BRB

  5. #5
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Cut specific text from cells and paste in neighbour cell

    Attachment 224872

    The above should be what you are looking for

  6. #6
    Registered User
    Join Date
    02-02-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Cut specific text from cells and paste in neighbour cell

    Hi Andy,

    I'm a bit confused. So what I need is to move the "(2 per box)" for example into a new cell. Can you give me the script that would do that?

  7. #7
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Cut specific text from cells and paste in neighbour cell

    1.Click the grey button
    2.Type "2 per box"
    3.Click OK

    and ensure macro's are enabled..

  8. #8
    Registered User
    Join Date
    02-02-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Cut specific text from cells and paste in neighbour cell

    Oh I see, yes it works now, thanks

    One more thing - it moves the entire text from the cell, however I need the specific text moved, what do I need to change?

  9. #9
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Cut specific text from cells and paste in neighbour cell

    Do you also need the specific text deleting from column A ?

  10. #10
    Registered User
    Join Date
    02-02-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Cut specific text from cells and paste in neighbour cell

    yes yes, that's the idea I need this text to be cut from that cell and moved to the next cell

  11. #11
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Cut specific text from cells and paste in neighbour cell

    Replace the existing code in module 1 with this.

    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    02-02-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Cut specific text from cells and paste in neighbour cell

    Andy, you are the best, thank you!

  13. #13
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Cut specific text from cells and paste in neighbour cell

    Anytime mate

  14. #14
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,538

    Re: Cut specific text from cells and paste in neighbour cell

    Or do you mean like this?
    Attached Files Attached Files
    Last edited by jindon; 04-09-2013 at 10:02 AM.

  15. #15
    Registered User
    Join Date
    02-02-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Cut specific text from cells and paste in neighbour cell

    Quote Originally Posted by AndyLitch View Post
    Attachment 224872

    The above should be what you are looking for
    Andy, the document you have attached, I can not download it anymore, could you reattach it please?

  16. #16
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Cut specific text from cells and paste in neighbour cell

    sample1 (1).xlsm

    There you go bud.. Make sure you save it cos it's only available for a fixed period.

+ 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