How to find the difference between two excel table ?

Hi Any expert can tell how to find the difference between two excel table ?  Thank you
eemoonAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Martin LissOlder than dirtCommented:
Can you post the workbook and tell us how you want the difference reported?
0
eemoonAuthor Commented:
thanks for your fast reply
it looks like the below tow tables

1      3      8     11    
1      6      9     12      


1      3      8     11    
1      6      5     12  

Above is two table, which has 4 column and 2 row, respectively. the difference between two table is 9 in up table and 5 in down table.
The real table is very large. How to find the difference in the two large table ?
0
Martin LissOlder than dirtCommented:
Please explain why "the difference between two table is 9 in up table and 5 in down table".

When you say "The real table is very large" do you mean that there are more rows? More columns?
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

eemoonAuthor Commented:
When you say "The real table is very large" do you mean that there are more rows? More columns?
Yes

Please explain why "the difference between two table is 9 in up table and 5 in down table".
this is explanation for that above table example

1      3      8     11    
1      6     9     12      


1      3      8     11    
1      6     5     12
0
Martin LissOlder than dirtCommented:
OK try this macro. It assumes the following:

The two tables are on different sheets
The two tables are the same size and the same position
Cell A1 is in the table.

Sub ShowDifferences()
Dim cel As Range

For Each cel In Sheets("Sheet1").Range("A1").CurrentRegion
    If cel.Value <> Sheets("Sheet2").Range(cel.Address) Then
        cel.Font.Bold = True
        Sheets("Sheet2").Range(cel.Address).Font.Bold = True
    End If
Next
End Sub

Open in new window

0
byundtCommented:
Approach 1: Use Conditional Formatting to highlight cells that are different from the other table.
1. Select all the cells in one of the tables
2. Create Conditional Formatting using a formula criteria like:
=A1<>A54              where A1 and A54 are the top left cells in the two tables
3. Choose a highlight color

Approach 2: Create an auxiliary column with a formula that compares one row with another
1. Create an auxiliary column to the right of the first table
2. Put a formula like the following in it:
=SUMPRODUCT(--(A1:Z1<>A54:Z54))         where A1 and A54 are the top left cells in the two tables and column Z is the rightmost column with data
3. Copy the above formula down. The easy way to do this is to doubleclick the little square at bottom right of the selection marquee surrounding the cell with the formula.
4, If you want to see just the table rows that have differences, then AutoFilter the auxiliary column and look for any value except 0
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
eemoonAuthor Commented:
Thank you. If I just want to compare two column( or two row) difference, do you think there is simpler way to do that ?
0
Martin LissOlder than dirtCommented:
Using my code, change line 4 to For Each cel In Selection then select the row(s) or column(s) you want to compare on Sheet1 and run the macro.

Just in case you need them, here are instructions on how to install and use the macro.

In Excel, Press Alt+F11 to open the Visual Basic Editor (VBE)

Right-click on your workbook name in the "Project-VBAProject" pane (at the top left corner of the editor window). If you don’t see an existing module then select Insert -> Module from the context menu. Otherwise just select the module.

Copy the macro (you can use the ‘Select All’ button if you like) and paste it into the right-hand pane of the VBA editor ("Module1" window)

Press Alt+F11 again to go back to Excel

Optionally, press Alt+F8 to open the "Macro" dialog window. Select the macro, click ‘Options…’,  hold down the Shift key and type the letter A (or any other letter) and click ‘OK’. Then anytime you want to run the macro press Ctrl+Shift+A.

When you close the workbook you will need to save it as an xlsm or xls file if it’s not already one of those.
0
Martin LissOlder than dirtCommented:
You're welcome and I'm glad I was able to help.

In my profile you'll find links to some articles I've written that may interest you.
Marty - MVP 2009 to 2015, Experts-Exchange Top Expert Visual Basic Classic 2012 to 2014
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.