+ Reply to Thread
Results 1 to 2 of 2

Copy row/range from worksheet A to worksheet B when column M in worksheet A equals "X"

  1. #1
    Registered User
    Join Date
    04-24-2018
    Location
    United States
    MS-Off Ver
    Windows 7 Professional
    Posts
    1

    Copy row/range from worksheet A to worksheet B when column M in worksheet A equals "X"

    I have a large parts database, 5000 rows. I want to be able to copy a range within a row from worksheet A "Combined" when column M in worksheet A equals "X". I would then like to paste this range into worksheet B which would be titled the same as column M from worksheet A. Currently I have 163 different possible values from column M in worksheet A, so I will be coping data from worksheet A to create 163 different inventory lists. I have created all the worksheets for the workbook, I just need help with the code to move the data.

    The "Combined" worksheet A is a living document and will be added to as new parts are added to the inventory. I was thinking it would be best to run a MACRO in the "Combined" worksheet that will loop through all 5000 rows, looking at column M to equal "X", coping A:T in that row and pasting the range in the worksheet B "titled the same as the value in column M", filling worksheet B down row by row.

    Help, I confuse myself.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Copy row/range from worksheet A to worksheet B when column M in worksheet A equals "X"

    Managing 163 seperate sheets would be cumbersome. I would think just using the AutoFilter feature on the Combined sheet would be easier to view a specific M value. If you need summary data of a specific value, the SUBTOTAL function will return results of filtered data. Or you can create a summary table using SUMIFS and COUNTIFS etc.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

+ 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 named range "headerrows" to each worksheet as created by named range "classes"
    By nigelog in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-25-2017, 05:23 AM
  2. Copy Range in row instead of "EntireRow" when creating New Worksheet with Macro
    By groundin in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-29-2017, 10:38 PM
  3. Replies: 3
    Last Post: 05-06-2013, 04:30 AM
  4. if cell equals "value" then return that entire row to another worksheet
    By juliehight in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-26-2012, 03:36 PM
  5. If the worksheet name begins with "CAL", copy the table to a new worksheet
    By Jessica.Bush in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-20-2011, 12:55 PM
  6. Copy cells from worksheet "1" and paste into worksheet "2"?
    By jonvanwyk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-23-2011, 10:15 AM
  7. VBA Code to copy a "criteria based" range of cells from worksheet A to worksheet B
    By xbaglione in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-09-2010, 10:37 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