• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Tables data compare|VBA & Macros|Excel Forum|My Online Training Hub

You are here: Home / Tables data compare|VBA & Macros|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumVBA & MacrosTables data compare
sp_PrintTopic sp_TopicIcon
Tables data compare
Avatar
David_Ng
Member
Members
Level 0
Forum Posts: 306
Member Since:
December 5, 2016
sp_UserOfflineSmall Offline
1
March 5, 2019 - 6:15 pm
sp_Permalink sp_Print

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 ...

Avatar
David_Ng
Member
Members
Level 0
Forum Posts: 306
Member Since:
December 5, 2016
sp_UserOfflineSmall Offline
2
March 5, 2019 - 7:54 pm
sp_Permalink sp_Print

Pls find attached sampls data file

Avatar
SunnyKow
Puchong, Malaysia

VIP
Members


Trusted Members
Level 8
Forum Posts: 1432
Member Since:
June 25, 2016
sp_UserOfflineSmall Offline
3
March 6, 2019 - 10:47 am
sp_Permalink sp_Print

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

Avatar
David_Ng
Member
Members
Level 0
Forum Posts: 306
Member Since:
December 5, 2016
sp_UserOfflineSmall Offline
4
March 6, 2019 - 11:35 am
sp_Permalink sp_Print

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

Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1514
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
5
March 6, 2019 - 12:22 pm
sp_Permalink sp_Print sp_EditHistory

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

Avatar
David_Ng
Member
Members
Level 0
Forum Posts: 306
Member Since:
December 5, 2016
sp_UserOfflineSmall Offline
6
March 6, 2019 - 12:32 pm
sp_Permalink sp_Print

Pls refer attached again!

Avatar
SunnyKow
Puchong, Malaysia

VIP
Members


Trusted Members
Level 8
Forum Posts: 1432
Member Since:
June 25, 2016
sp_UserOfflineSmall Offline
7
March 6, 2019 - 2:15 pm
sp_Permalink sp_Print sp_EditHistory

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

Avatar
David_Ng
Member
Members
Level 0
Forum Posts: 306
Member Since:
December 5, 2016
sp_UserOfflineSmall Offline
8
March 6, 2019 - 7:49 pm
sp_Permalink sp_Print

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

Avatar
SunnyKow
Puchong, Malaysia

VIP
Members


Trusted Members
Level 8
Forum Posts: 1432
Member Since:
June 25, 2016
sp_UserOfflineSmall Offline
9
March 7, 2019 - 4:07 pm
sp_Permalink sp_Print sp_EditHistory

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

Avatar
David_Ng
Member
Members
Level 0
Forum Posts: 306
Member Since:
December 5, 2016
sp_UserOfflineSmall Offline
10
March 7, 2019 - 4:34 pm
sp_Permalink sp_Print

THANKS  MILLIONS SUNNY WILL GIVE A TRY ..

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Shanna Henseler
Guest(s) 4
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 870
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
A.Maurizio: 202
Jessica Stewart: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
John Chisholm
vexokeb sdfg
John Jack
Malcolm Toy
Ray-Yu Yang
George Shihadeh
Naomi Rumble
Uwe von Gostomski
Jonathan Jones
drsven
Forum Stats:
Groups: 3
Forums: 24
Topics: 6210
Posts: 27236

 

Member Stats:
Guest Posters: 49
Members: 31888
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.