Compare two Ecxel Sheet

C

compare xl

Hi,

I would like to have a macro that will compare the contents of two excels
and return the difference in terms of red colors in the target excel.

Thanks in advance,
Santanu
 
P

Per Jessen

Hi

We need some more information.

Do your want to compare two sheets in same workbook or maybe multiple sheets
in two workbooks?

How are your data layout, ie which columns and rows needs to be compared. Do
you want to compare cell by cell or row by row.

Shall only a single cell be highligheted, or maybe the entire column.

Regards,
Per
 
R

ryguy7272

More information would be helpful. This MAY do what you want:
Sub Compare2Shts()
For Each Cell In Worksheets("Sheet1").UsedRange
If Cell.Value <> Worksheets("Sheet2").Range(Cell.Address) Then
Cell.Interior.ColorIndex = 3
End If
Next

For Each Cell In Worksheets("Sheet2").UsedRange
If Cell.Value <> Worksheets("Sheet1").Range(Cell.Address) Then
Cell.Interior.ColorIndex = 3
End If
Next
End Sub
 
C

compare xl

Hi Jessen,

I have two excel sheets. I would like the macro to compare all the
worksheets in the XL files cell wise and written the difference in the latter
file.

Let me know if you need more details.

Thanks
Santanu
 
M

MC Saravanan

Hello Sir,

It's really working for my process, can u help me more on this.
Let me explain the 2 scenario,

1--> If any row or column got inserted ?
2--> Same for delete ?

So, on the above scenario's the code should highlight in different colour.

This will reduce atleast 1 hc in my process.

Thanks for the understanding


Best Regards,

MC Saravanan
+91-98409-22085
(e-mail address removed)
(e-mail address removed)
 
M

MC Saravanan

Hello Sir,

It's really working for my process, can u help me more on this.
Let me explain the 2 scenario,

1--> If any row or column got inserted ?
2--> Same for delete ?

So, on the above scenario's the code should highlight in different colour.

This will reduce atleast 1 hc in my process.

Thanks for the understanding


Best Regards,

MC Saravanan
+91-98409-22085
(e-mail address removed)
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top