+ Reply to Thread
Results 1 to 5 of 5

Vba to compare two sheets for matches and if found Move all data pertaining.

  1. #1
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Vba to compare two sheets for matches and if found Move all data pertaining.

    Hello World

    I have learned so much from this Forum over the past year and have accomplished so much by searching, however there comes a time where I have no clue where to start and this example is one of those times.

    I have 3 sheets named New Customers, Customer sales & Line Extensions.

    I need to find code to do the following:
    1. Search through Sheets("Customer Sales"). Range("A:A") to find the names in Sheets("New Customers"). Range("A:A")
    2. Copy all the data under that name to Sheets("Line Extensions") as per outcome in attached sample sheet.
    3. If no match, then do nothing.

    Any idea where I can start...
    Attached Files Attached Files

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Vba to compare two sheets for matches and if found Move all data pertaining.

    Well...allrighty then

    This so far Finds the names as long as they are the same...A start I guess.

    Please Login or Register  to view this content.

  3. #3
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Vba to compare two sheets for matches and if found Move all data pertaining.

    Threw something together quickly see if you can adjust the output. Not sure how the Line Ext worksheet will look before running the macro. If you can not adjust for your needs let me know what the line sheet will look like before running macro and I'll get back a lil bit later.

    Please Login or Register  to view this content.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Vba to compare two sheets for matches and if found Move all data pertaining.

    Mike...You area superstar..Seems to work. Will try and figure out the setup.
    IF not, will most definately come back to you for assistance. Would not have figured this out....

  5. #5
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Vba to compare two sheets for matches and if found Move all data pertaining.

    Wow, i wish i had the ability to "JUST THROW CODE TOGETHER QUICKLY"
    Have got such a long way to go lol.... Mike, it works just perfectly as is.

    Thanks again.

+ 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] Compare fields and if match found move data and delete row
    By Metrazal in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-11-2016, 08:32 AM
  2. [SOLVED] Compare two sheets to find matches?
    By BlueMoonNJ in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-14-2013, 04:16 PM
  3. Need to move data that matches criteria in cell and move to new worksheet
    By panagle in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-27-2013, 09:23 AM
  4. Macro help pertaining to compare
    By lorenzoscott78 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-03-2013, 06:33 PM
  5. Compare Data in 2 sheets and delete or move rows
    By tracktor in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-21-2011, 12:21 AM
  6. Fastest way to compare two sheets and copy matches
    By Rodrigo Rocha in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-24-2010, 01:50 PM

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