+ Reply to Thread
Results 1 to 5 of 5

Match values in Column C and copy entire row

  1. #1
    Forum Contributor
    Join Date
    11-04-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    334

    Match values in Column C and copy entire row

    My sheet contains data in Columns(A:D)
    I am trying to match C2 with C3, C4, C5, C6....C? and copy the entire row and its match to another worksheet in the same row.
    Looping through each value in "C" and copying any matches to the next empty row
    My sheet will be sorted by Column C and Column A (the date oldest to newest)


    For example:

    If C2 = C3 then
    Copy (A2:D2) to Sheet("Copy").Range(A2:D2) AND Copy (A3:D3) to Sheet("Copy").Range(E2:H2)

    if C2 = C4 then
    Copy (A2:D2) to Sheet("Copy").Range ?? AND Copy (A4:D4) to Sheet(Copy") [To the next empty row in the sheet]


    I have attached a sample workbook.
    TEST COPY DT.xlsx
    Any assistance appreciated.
    Thanks.

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Match values in Column C and copy entire row

    Maybe:

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    11-04-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    334

    Re: Match values in Column C and copy entire row

    Thanks for the reply JHD, I will give it a try and get back to you.

  4. #4
    Forum Contributor
    Join Date
    11-04-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    334

    Re: Match values in Column C and copy entire row

    Thanks for a solution to my problem JHD. Much appreciated.

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Match values in Column C and copy entire row

    You're welcome. Glad to help out and thanks for the feedback. Please comply with Forum Rule No. 9.


    9. Acknowledge the responses you receive, good or bad. If your problem is solved, please say so clearly, and mark your thread as Solved: Click Thread Tools above your first post, select "Mark your thread as Solved". Or click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Dropdown option or Edit button will not appear -- ask a moderator to mark it.

+ 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. Copy rows that match values in a column of names
    By lunatyck in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-13-2012, 11:22 AM
  2. Compare Values in 2 columns and Copy the entire row upon match
    By tachytank in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-07-2011, 01:42 AM
  3. Match cell value and copy entire row to new sheet
    By smfar777 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-11-2010, 06:43 AM
  4. Index match to VBA copy the found entire row
    By Sjaaktrekhaak in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-20-2009, 03:22 AM
  5. Match 1 criteria if matches then copy the entire row plus 1 row above and below
    By khalid79m in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-27-2007, 11:32 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