Comparing spreadsheets

22strider

Active Member
Joined
Jun 11, 2007
Messages
311
Hello Friends

Is there a way to compare two spreadsheets for changes and get the changed cells in original sheet highlighted?

I have two spreadsheets; one is the original sheet that we sent out for some modifications. And the other sheet is the modified one. Both have about 1000+ records. I need to compare the two sheets and highlight changes. So that I can put two sheets side by side and see the change (with highlighted changes).

Thanks for your time.
Rajesh
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Hello kpark91:

Both the sheets have same heading/fields. Basically these are lists of part numbers along with their attributes. So I am trying to identify difference in attributes for individual part numbers.

Yes, both sheets have same fields.

Thanks
Rajesh
 
Upvote 0
I checked it has limitations of 30 rows and 10 columns; usefull but may not work for my project.
Thanks for pointing out though.
 
Upvote 0
Try this then:

Code:
Sub TEST
    Application.ScreenUpdating = False
 
    Dim lr, lc As Integer
 
    lr = Range("A" & Rows.Count).End(xlUp).Row
    lc = Range("A" & Columns.Count).End(xlLeft).Column
    'In case you want to compare Sheet1 and Sheet2
    For i = 1 to lr Then
        For j = 1 to lc Then 
            If sheet1.Cells(i,j).Value <> Shee2.Cells(i,j).Value Then
                Sheet1.Cells(i,j).Interior.Color = RGB(255,0,0)
            End If
        Next j
    Next i
    Application.ScreenUpdating = True
End Sub
 
Upvote 0

Forum statistics

Threads
1,213,515
Messages
6,114,080
Members
448,548
Latest member
harryls

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top