Forum

Tables data compare
 
Notifications
Clear all

Tables data compare

10 Posts
3 Users
0 Reactions
66 Views
(@david_ng)
Posts: 310
Reputable Member
Topic starter
 

Need a Macro to compare two tables data [ downloaded from two Systems]base on PO and Item No.[ common fields exist in two

Tables then using Pivot Report ...

Pls refer attached ...

 
Posted : 06/03/2019 4:15 am
(@david_ng)
Posts: 310
Reputable Member
Topic starter
 

Pls find attached sampls data file

 
Posted : 06/03/2019 5:54 am
(@sunnykow)
Posts: 1417
Noble Member
 

Hi David

It is very unclear what you are trying to achieve. What are you trying to compare? What is the expected result from the comparison? etc....

Please supply more details on what is the expected result and how you intend to achieve it.

Without these it it difficult to offer any assistance.

Sunny

 
Posted : 06/03/2019 8:47 pm
(@david_ng)
Posts: 310
Reputable Member
Topic starter
 

I want to compare Two Tables data base on PO and Item No. [ both fields exist in two tables]  to find out the discrepancy between two System record for quantity received.

 

Warehouse1                                                 Warehouse2                                 Difference

PO  Item No         Qty                                   PO Item No            Qty    

XXXXXXXXX  10     10                                   XXXXXXXXX  10        5                         5

XXXXXXXXX  20     15                                   XXXXXXXXX  20        15                        0

XXXXXXXX1  10     150                                 XXXXXXXX1  10        115                      35

 
Posted : 06/03/2019 9:35 pm
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

David,

Please supply a workbook otherwise we have to spend time typing in the data that you should already have at hand.

Also, typing in data like this does not tell us things like:

 - If you are actually using tables

 - If the tables are in the same sheet or workbook

 - If you have formatted the data correctly - e.g. do you have numbers stored as text?

Please make it easy for us to help you!

Thanks

Phil

 
Posted : 06/03/2019 10:22 pm
(@david_ng)
Posts: 310
Reputable Member
Topic starter
 

Pls refer attached again!

 
Posted : 06/03/2019 10:32 pm
(@sunnykow)
Posts: 1417
Noble Member
 

Hi David

Your data have a lot of duplicates and need to be consolidated before any comparison can be made.

Furthermore the PO# and Item is Text in Warehouse1 but values in Warehouse2 and these need to be cleaned first.

I would prefer to combine the required fields together (like what I did in Warehouse1 sheet) add some helper columns and do a PivotTable.

I then added a Calculated Field to show the difference.

I don't think a macro will help in your situation.

Hope this helps.

Sunny

 
Posted : 07/03/2019 12:15 am
(@david_ng)
Posts: 310
Reputable Member
Topic starter
 

Thanks  Sunny so sorry for the messy data. But what i really want is to use a macro to joint the Tables data together base on common field PO #  and Item # then do the comparsion using Pivot Table... Is this possible

 
Posted : 07/03/2019 5:49 am
(@sunnykow)
Posts: 1417
Noble Member
 

Hi David

Frankly I have never liked creating Pivot Tables using VBA but this one just for you.

Just run the macro named ConsoleData

Good luck.

Sunny

 
Posted : 08/03/2019 2:07 am
(@david_ng)
Posts: 310
Reputable Member
Topic starter
 

THANKS  MILLIONS SUNNY WILL GIVE A TRY ..

 
Posted : 08/03/2019 2:34 am
Share: