+ Reply to Thread
Results 1 to 7 of 7

Cut and Paste entire row based on criteria - Need help

  1. #1
    Registered User
    Join Date
    05-11-2014
    MS-Off Ver
    Excel 2003
    Posts
    10

    Cut and Paste entire row based on criteria - Need help

    Hello everyone,

    I am new to VBA and I know this question has been asked multiple times. I have ready these responses, but I cannot seem to get any of them to work for me. I am trying to write a macro which will select any row in ws "Input-Project_Register" that has "Not Approved" selected in Column 'H' and cut and paste it into the first empty row in ws "Input-Archive" and select any row in ws "Input-Project_Register" that has "Completed" in Column 'BI' and cut and paste it into the first empty row in ws "Input-Complete". I want this macro to be assigned to an Active X control button.

    Any help would be greatly appreciated. I am trying to get this figured out today so that it is complete by the start of work tomorrow.

    Thank you in advance for any help!

    Best Regards,

    Nathan

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,893

    Re: Cut and Paste entire row based on criteria - Need help

    Nathan--welcome. Suggest you upload a sample workbook that can be tested once code is written.

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    05-11-2014
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Cut and Paste entire row based on criteria - Need help

    Alansidman,

    Thank you for your response. Attached is my sanitized file. I have removed a lot, but I think it retains everything which is necessary to develop this functionality.

    Thank you so much for your help.

    Best Regards,

    Nathan
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Cut and Paste entire row based on criteria - Need help

    Are you sure it is column BI? Try this:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-11-2014
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Cut and Paste entire row based on criteria - Need help

    Stnkynts,

    Thank you for your response! this works great to copy the rows to the Archive and Completed worksheets. I think I forgot to add in my initial post that I would also like to delete the copied rows after they are added to the other worksheets. After the rows are deleted I would like to shift the rows below up to fill in blank rows, or autosort by project number (Column 'F'). I already have written VBA to autosort by project number so maybe it would work to copy and paste this at the end?

    But If I autosort, then when the data from the row is deleted, I need to make sure the formulas in that row are not deleted.

    Do you have any recommendations in this regard?

    Thank you for all your help.

    Best Regards,

    Nathan
    Last edited by NateS; 05-11-2014 at 03:56 PM. Reason: Remembered about the formulas in the rows

  6. #6
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Cut and Paste entire row based on criteria - Need help

    Try this. Not 100% sure how it will work but I don't want to have to rewrite the code a different way to delete the rows.

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    05-11-2014
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Cut and Paste entire row based on criteria - Need help

    Stnkynts,

    I added .Offset(1) to the .AutoFilterMode.Range.Delete because it was deleting my header row, but it works like a charm. Thank you for all your help!!!! I really appreciate it!

    Best Regards,

    Nathan

+ 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. Cut and paste an entire row to another sheet if a cerain criteria is met
    By julia_helena in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-12-2014, 01:53 PM
  2. [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
  3. Cut entire row and paste to new sheet if cells and date criteria match
    By themansion in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-20-2013, 01:25 AM
  4. [SOLVED] Delete entire row based on 2 criteria
    By coopman64 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-13-2012, 03:38 PM
  5. [SOLVED] Cut and Paste entire row to new worksheet based on criteria in 1 cell
    By KS1986 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-20-2012, 05:56 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