+ Reply to Thread
Results 1 to 7 of 7

VBA code, cut and paste entire row into new sheet per specific condition in cell

  1. #1
    Forum Contributor
    Join Date
    09-10-2012
    Location
    Slovakia
    MS-Off Ver
    Excel 365
    Posts
    174

    VBA code, cut and paste entire row into new sheet per specific condition in cell

    Hi dears,

    I am looking for code, which can do following:

    If cell from column "S" in sheet "Input Data" is ITCP then entire row will be cut and paste into sheet ITCP and subsequently removed from "Input Data". All formatting has to be unchanged.

    Pls refer to enclosed file contains data.

    China PP V1.0.xlsm

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: VBA code, cut and paste entire row into new sheet per specific condition in cell

    Try this one (it is registered and only a bit "tuned up" by introducing 1 variable - last not empty row LR
    Please Login or Register  to view this content.
    Best Regards,

    Kaper

  3. #3
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: VBA code, cut and paste entire row into new sheet per specific condition in cell

    1 of the possibilities


    Kind regards
    Leo
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    09-10-2012
    Location
    Slovakia
    MS-Off Ver
    Excel 365
    Posts
    174

    Re: VBA code, cut and paste entire row into new sheet per specific condition in cell

    thanks to both of you for excellent help. Both codes works perfectly.

    Just 'small' upgrade from my side, since meantime I noticed that I have to update my request. I additionally enclosed new file as example.

    Just, fyi I moved all columns right so condition "ITCP" is available in column "T".

    What I need is:
    - for each data in columnt "T" create new sheet with same name as is cell's contain (e.q. "0030-ICST", "0030-ITCP", "0526-ICST" ....) and move entire rows from "Input Data" to this newly created sheet and then remove those rows from "Input data".
    Attached Files Attached Files

  5. #5
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: VBA code, cut and paste entire row into new sheet per specific condition in cell

    Indeed "small" :-P
    Then just registration and tuning will not be enough.
    Try this one (I reused part of code but new important parts were also added):
    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: VBA code, cut and paste entire row into new sheet per specific condition in cell

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    09-10-2012
    Location
    Slovakia
    MS-Off Ver
    Excel 365
    Posts
    174

    Re: VBA code, cut and paste entire row into new sheet per specific condition in cell

    Kaper, Leo, once again, THANK YOU VERY MUCH. Both codes work perfectly.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Copy/paste entire row if a cell in that row contains specific data
    By SamYounno in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-17-2015, 10:53 AM
  2. VBA Code to Copy entire sheet and paste in another sheet
    By molly13 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-28-2015, 11:45 AM
  3. [SOLVED] Copy entire row based on 2 criteria and paste on the next blank row on a specific sheet
    By ALNER in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-25-2014, 11:23 PM
  4. [SOLVED] copy paste entire row into a specific cell in sheet 2
    By melody10 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-29-2013, 04:40 PM
  5. [SOLVED] cut and paste entire row to another worksheet if cell contains a specific text
    By melody10 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-25-2013, 10:16 AM
  6. [SOLVED] VBA code to copy and paste an entire row from one sheet to another
    By emach in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 09-24-2013, 12:12 PM
  7. Move entire row to new sheet if condition is true in a specific column
    By mic1978 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-14-2013, 08:29 AM

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