+ Reply to Thread
Results 1 to 4 of 4

Compare two sheets and copy/paste value from sheet1 to sheet2

  1. #1
    Registered User
    Join Date
    06-20-2022
    Location
    Berlin, Germany
    MS-Off Ver
    2013
    Posts
    7

    Compare two sheets and copy/paste value from sheet1 to sheet2

    Hello dear people,

    I hope someone can help me with the following problem. I dont have an idea how to write this macro:

    Compare the last filled row in column1 of sheet1 (green) with the equal value in column1 of sheet2 (green). If values are the same, copy everything under the result (columnA:columnC) from Sheet2 (red) and paste it into Sheet1 (red). This is because Sheet2 updates every time I open it and to edit the new values I have to copy them to Sheet1. That should be done with the macro.

    I've included an example and I hope it makes sense.

    Many thanks in advance

    Best regards
    valuca
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    06-27-2010
    Location
    sYRIA
    MS-Off Ver
    Excel 2013
    Posts
    669

    Re: Compare two sheets and copy/paste value from sheet1 to sheet2

    Hi
    Try this
    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Cool Hello, try this !


    A VBA demonstration as a beginner starter :

    PHP Code: 
    Sub Demo1()
            
    Dim Rc As Range
            Set Rc 
    Sheets("Table1").Cells(Rows.Count1).End(xlUp)
        
    With [Table2!A1].CurrentRegion.Rows
            V 
    Application.Match(Rc, .Columns(1), 0)
            If 
    IsNumeric(VThen If < .Count Then .Item(":" & .Count).Copy Rc(2)
        
    End With
            Set Rc 
    Nothing
    End Sub 
    ► Do you like it ? ► So thanks to click on bottom left star icon ? Add Reputation ? !

  4. #4
    Valued Forum Contributor
    Join Date
    08-08-2022
    Location
    Buenos Aires
    MS-Off Ver
    Excel 2019
    Posts
    1,777

    Re: Compare two sheets and copy/paste value from sheet1 to sheet2

    Hello everyone
    It could also be done like this:

    Please Login or Register  to view this content.
    Last edited by beyond Excel; 09-21-2022 at 07:36 AM.

+ 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 Ref in Col B on Sheet1 to sheet 2 and where the no match copy data to sheet2
    By Howardc1001 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-13-2019, 11:15 PM
  2. Copy & Paste from Sheet1 to Sheet2
    By Spikyd in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-17-2018, 03:35 AM
  3. Compare and copy new rows from Sheet2 to Sheet1 if conditions are met
    By author1 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-25-2014, 02:07 PM
  4. Replies: 6
    Last Post: 07-25-2013, 02:58 PM
  5. Macro to compare two sheets and insert new sheet from Sheet1 to Sheet2
    By kmccarty in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-21-2012, 03:40 PM
  6. [SOLVED] Copy and Paste Entire Row from Sheet1->Sheet2 based on text string match in Sheet1 Row
    By dmlovic in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-17-2012, 08:42 AM
  7. [SOLVED] Compare 2 cells in 2 sheets, if both match append data in Sheet2 to Sheet1
    By furious0331 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-29-2012, 01:05 AM

Tags for this Thread

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