Comparing and Matching data in 2 Excel files.

Kingston

New Member
Joined
Apr 25, 2023
Messages
1
Office Version
  1. 2021
Platform
  1. Windows
Hey all I wonder if you can help at all. I am looking for a solution to a problem I am having with 2 XML files that have been output by an external program and I want to compare the data in the two files across a select number of columns in which I know the data can be matched as these columns are common between both files. I have done a lot of google searching and digging to try and find a solution but haven't managed to as yet. The only thing I seemed to find that helped was that the native XML files had poor structure and so opening them and exporting as XLSX files gave a far better file structure which can then be used for my purpose.

What I am trying to create is something that will convert an XML file into an XLSX file and then use the XLSX file to do some data matching between a pre-set number of columns but data must match across all the designated columns in order to be a match, it can’t just be 1 or 2 that match and that’s good enough it needs to be all. Once it has found a match it outputs the full row of each file into a new file which has 2 sheets in, each sheet represents one of the original files, within each sheet is a newly created column called Key which contains a unique reference number starting at 0000001 and going up which allows for a reference point to the matching rows as I will be doing some filtering of the data at a later stage but for now just being able to match up the data would be amazing.

Here is a list of the columns in each file that should be used purely for the purpose of matching data.

Withing the forward file: 'Back Result', 'Trades', 'PipStep', 'PipStepExponent', 'DelayTradeSequence', 'ReverseSequenceDirection', 'LotSize', 'LotSizeExponent', 'RsiTimeframe', 'RsiPeriod', 'RsiSellLevel', 'EmaTimeframe', 'EmaPeriods', 'EmaTrendRule', 'AdxTimeframe', 'AdxPeriod','AdxThreshold', 'AdxTrendRule', 'NewsAction'

Within the back file: 'Result', 'Trades', 'PipStep', 'PipStepExponent', 'DelayTradeSequence', 'ReverseSequenceDirection', 'LotSize', 'LotSizeExponent', 'RsiTimeframe', 'RsiPeriod', 'RsiSellLevel', 'EmaTimeframe', 'EmaPeriods', 'EmaTrendRule', 'AdxTimeframe', 'AdxPeriod','AdxThreshold', 'AdxTrendRule', 'NewsAction'

Once a match has been found using all of the above columns to match the data then that entire row should be output to the new _Matched file.

The full column list from each file is as follows.

Forward file: ‘Pass’, ‘Forward Result’, ‘Back Result’, ‘Profit’, ‘Expected Payoff’, ‘Profit Factor’, ‘Recovery Factor’, ‘Sharpe Ratio’, ‘Custom’, ‘Equity DD %’, ‘Trades’, 'PipStep', 'PipStepExponent', 'DelayTradeSequence', 'ReverseSequenceDirection', 'LotSize', 'LotSizeExponent', 'RsiTimeframe', 'RsiPeriod', 'RsiSellLevel', 'EmaTimeframe', 'EmaPeriods', 'EmaTrendRule', 'AdxTimeframe', 'AdxPeriod','AdxThreshold', 'AdxTrendRule', 'NewsAction'

Back File: ‘Pass’, ‘Result’, ‘Profit’, ‘Expected Payoff’, ‘Profit Factor’, ‘Recovery Factor’, ‘Sharpe Ratio’, ‘Custom’, ‘Equity DD %’, ‘Trades’, 'PipStep', 'PipStepExponent', 'DelayTradeSequence', 'ReverseSequenceDirection', 'LotSize', 'LotSizeExponent', 'RsiTimeframe', 'RsiPeriod', 'RsiSellLevel', 'EmaTimeframe', 'EmaPeriods', 'EmaTrendRule', 'AdxTimeframe', 'AdxPeriod','AdxThreshold', 'AdxTrendRule', 'NewsAction'

Would anyone know of a method I could use to achieve this? Thanks in advance for any help or suggestions offered.
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

Forum statistics

Threads
1,224,820
Messages
6,181,160
Members
453,021
Latest member
Justyna P

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