+ Reply to Thread
Results 1 to 5 of 5

Search Excel Sheets Against Each other then copy rows

  1. #1
    Registered User
    Join Date
    12-14-2013
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2007
    Posts
    3

    Search Excel Sheets Against Each other then copy rows

    I've been working on this for hours all day today and really need some help.

    In sheet1, columnA is empty. I want to use columnB to find a match in sheet2 columnB. When it finds a match, it will copy the data from columnA in sheet2 over to columnA in sheet1. Or if it is easier, I can copy the entire row.

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

    Re: Search Excel Sheets Against Each other then copy rows

    Don't need a macro. Put this formula in sheet1 cell A1 and fill down

    Please Login or Register  to view this content.

  3. #3
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Search Excel Sheets Against Each other then copy rows

    Hi Dawg,

    Try this:

    Please Login or Register  to view this content.
    Directions for running the routine(s) just supplied

    Copy the code to the clipboard

    Press ALT + F11 to open the Visual Basic Editor.

    Open a macro-enabled Workbook or save your Workbook As Macro-Enabled

    Select “Module” from the Insert menu

    Type "Option Explicit" then paste the code under it

    And, you should be ready to go

    With the cursor between Sub and End Sub press F5 (F8 to Single Step)

    OR

    Press ALT + Q to close the code window.

    Press ALT + F8 then double click on the macro name
    Last edited by xladept; 01-02-2014 at 11:32 PM. Reason: Details
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  4. #4
    Registered User
    Join Date
    12-14-2013
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Search Excel Sheets Against Each other then copy rows

    Thank you for the help!

    I'm trying to run the script and I'm getting the following error:

    Please Login or Register  to view this content.
    When I run Debug it shows this line highlighted in yellow:

    Please Login or Register  to view this content.

  5. #5
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Search Excel Sheets Against Each other then copy rows

    Try:

    Please Login or Register  to view this content.
    I edited my first post, the mistake should have never been made - Sorry!
    Last edited by xladept; 01-02-2014 at 11:33 PM.

+ 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] Excel macro, compare two columns from 2 sheets and copy the different rows
    By lagiosman in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-10-2013, 11:09 AM
  2. Replies: 1
    Last Post: 02-27-2013, 10:33 PM
  3. [SOLVED] Macro to search a string, then search above for another one and copy the rows between them
    By DarKDjinni in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-20-2012, 09:36 PM
  4. Search for Multiple String Values on Multiple Sheets and Copy Rows to New Sheet
    By rrtikker in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-15-2012, 12:21 PM
  5. Add rows and search/copy/paste text into added rows
    By HelenW in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-14-2010, 04:06 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