Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9088851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T21:59:50+00:00 2026-06-16T21:59:50+00:00

Guys I’m looking for a simple Excel macro that can copy a row from

  • 0

Guys I’m looking for a simple Excel macro that can copy a row from one sheet to another when a column is different, but in the new sheet is not placed in the same row where they was, else that it will be added contiguously…

Sheet1:

A B C
One Spain 1000
Two Japan 2000
Three EEUU 3000

Sheet2:

A B C
One Italy 1000
Two Japan 2000
Three EEUU 4000

Sheet3(Final):

A B C
One Italy 1000
Three EEUU 4000

I would compare the sheet “Sheet1” with sheet “Sheet2” and if you find any difference in any column, copy the entire row of the worksheet “Sheet2” to a worksheet “Sheet3”.

Any tips would be much obliged.
Sory for my English, but I’m from Argentina.

thanks, Ignacio G

EDIT:
Actually, I’m using this code:

Public Sub ReconReport()
Dim rngCell As Range

For Each rngCell In Worksheets("Sheet1").UsedRange
    If Not rngCell = Worksheets("Sheet2").Cells(rngCell.Row, rngCell.Column) Then _
        Let Worksheets("Sheet3").Cells(rngCell.Row, rngCell.Column) = rngCell
    Next
End Sub

But it just copy different cells, and what I need is that I copy the entire row …

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T21:59:52+00:00Added an answer on June 16, 2026 at 9:59 pm

    Slow Answer:

    Sub ReconReport()
        'Set Worksheets to Variables
        Dim sheetOne, sheetTwo, sheetThree As Worksheet
        Set sheetOne = Worksheets("Sheet1")
        Set sheetTwo = Worksheets("Sheet2")
        Set sheetThree = Worksheets("Sheet3")
    
        'Find Used Rows and Columns
        Dim usedRows, usedCols As Integer
        usedRows = sheetOne.UsedRange.Rows.Count
        usedCols = sheetOne.UsedRange.Columns.Count
    
        Dim row, col, copyRow, copyCol As Integer
        copyRow = 1 'Row on sheet three
        For row = 1 To usedRows
            For col = 1 To usedCols
                If Trim(sheetOne.Cells(row, col).Value) <> Trim(sheetTwo.Cells(row, col).Value) Then
    
                    'Copy All Columns from that row (on Sheet2) to Sheet3
                    For copyCol = 1 To usedCols
                        sheetThree.Cells(copyRow, copyCol).Value = sheetTwo.Cells(row, copyCol).Value
                    Next copyCol
    
                    'Increment the sheet3 row so next info starts on new line
                    copyRow = copyRow + 1 
    
                    'Exit column search loop so only one row added if two columns have differences in the same row 
                    Exit For
    
                End If
            Next col
        Next row
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Guys, Can you please tell me that ,I wants to learn Azure , by
Guys I am new to Windows Phone Development in .Net Can any one guide
guys How can i achieve the following var productslist=from p in productsTable select new
guys please help me to create one simple search engine it should be like
Guys I m using a simple listview. I have two activities one main and
Guys, I've came across this problem I can't resolve myselg, I'm pretty sure I
Guys, what is function called after my class loaded, where i can call self
Guys can you suggest me any software who have some similarities with Microsoft's SQL
Guys how can i remove an input with a specific value using jquery? I
Guys. I use getpixel & getdata to retrieve data from the same pic.but some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.