+ Reply to Thread
Results 1 to 4 of 4

Macro: Copy/cut all rows matching criteria, and paste into specific Table/sheet

  1. #1
    Registered User
    Join Date
    07-03-2016
    Location
    Washington, USA
    MS-Off Ver
    2016
    Posts
    38

    Macro: Copy/cut all rows matching criteria, and paste into specific Table/sheet

    Ok, going to give this a shot, formulas are more my game than Macros, not sure if this is easy or not - just hoping it's clear what i'm asking.

    I have a similar, less involved Macro that has this piece of code which may help start the process of identifying the criteria.

    Please Login or Register  to view this content.
    What I want is:
    • To identify the criteria (all rows where column 'B' match the active cell - which will be a 6 digit number)
    • Copy/Cut (i'm wanting to MOVE data not just copy it, delete the old rows too not just data) from 'Platter!Table1'
    • Paste the selected rows into the existing 'Finished!Table3' (Can i choose which TYPE of paste it performs?)
    • Assuming the old rows are deleted, data move successful.

    I also want to create a 2nd Macro that would move the data back from Table3 to Table1, but i'm assuming i can manage that by playing with the code from this once we get it.

    Let me know if there's any other info i can provide that helps, thanks.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,480

    Re: Macro: Copy/cut all rows matching criteria, and paste into specific Table/sheet

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  3. #3
    Registered User
    Join Date
    07-03-2016
    Location
    Washington, USA
    MS-Off Ver
    2016
    Posts
    38

    Re: Macro: Copy/cut all rows matching criteria, and paste into specific Table/sheet

    Ok, attached a mock version of my workbook.

    Sheets involved:
    • Platter
    • Finished

    On sheet: 'Platter', you'll notice column B is exclusively 6-digit numbers. Every unique number has several rows and represents a formula for a batch.

    I have a few macros in place that make it really easy for me to assign a batch number to a particular person by filling values into column C
    As well as a couple macros to fill in a Y/N value for column N, to indicate if a batch is finished or not. Pics/Code below.

    Current Macros for batches, pastebin: http://pastebin.com/HhEnZf1m

    Image showing above macro buttons:
    macroribbon.png

    What I'm looking for:

    Right now, after a batch is finished, i indicate it as Done with a macro above. But then i have to manually select the rows, cut/copy, select a cell underneath Table3 on Sheet 'Finished', and paste. Then go back to Table1 on Sheet 'Platter' and delete the old blank rows.

    I'm hoping to automate the moving of a particular set of rows with the 6-digit number matching the active cell (in column B) from one table to another.

    And if it's possible, i'd like only the cell values to be pasted/moved - i'd rather the formats not come too. I usually achieve this by pasting via 'Right-click cell + S V'

    Hope this helps
    Attached Files Attached Files
    Last edited by Andrewjs; 02-08-2017 at 01:59 AM. Reason: ctrl != right-click

  4. #4
    Registered User
    Join Date
    07-03-2016
    Location
    Washington, USA
    MS-Off Ver
    2016
    Posts
    38

    Re: Macro: Copy/cut all rows matching criteria, and paste into specific Table/sheet

    Bumping for weekend

+ 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. Replies: 12
    Last Post: 02-21-2013, 12:55 PM
  2. Move Rows of Data from a Specific Column (Based on Matching Criteria) to a new Sheet
    By jordan1214 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-21-2013, 02:30 AM
  3. MAcro to extract rows matching a criteria and paste in another sheet
    By vandana_karthik in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-08-2013, 01:24 AM
  4. [SOLVED] Copy and paste data from sheet 2 to sheet 1 based on specific criteria on sheet 1
    By VBADUD in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-05-2012, 04:18 AM
  5. Within a loop, need to copy all rows from one sheet to another upon matching criteria
    By ripvanbrown in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-17-2012, 03:52 PM
  6. Copy Paste data with matching criteria from different sheet
    By Noor Hussain in forum Excel General
    Replies: 0
    Last Post: 06-14-2012, 01:23 AM
  7. [SOLVED] Macro to copy and paste rows to a new sheet based on criteria
    By Belo in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-31-2010, 02:25 AM
  8. code required to copy and paste rows matching a criteria.
    By Duguid1 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-30-2008, 04:49 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