SHARRIS2013
New Member
- Joined
- Jan 3, 2013
- Messages
- 10
Hi,
I have a set of data like the below in sheet 1, i need to match the data by order number and show differences as exeptions on sheet 2
[TABLE="width: 480"]
<TBODY>[TR]
[TD]Order</SPAN>[/TD]
[TD]Purchase/Sale</SPAN>[/TD]
[TD]Currency</SPAN>[/TD]
[TD]CCY 1</SPAN>[/TD]
[TD]AMT 1</SPAN>[/TD]
[TD]CCY 2</SPAN>[/TD]
[TD]AMT 2</SPAN>[/TD]
[TD]Date[/TD]
[/TR]
[TR]
[TD]123</SPAN>[/TD]
[TD]P</SPAN>[/TD]
[TD]GBP/USD</SPAN>[/TD]
[TD]GBP</SPAN>[/TD]
[TD]100</SPAN>[/TD]
[TD]USD</SPAN>[/TD]
[TD]160</SPAN>[/TD]
[TD]29/01/2013[/TD]
[/TR]
[TR]
[TD]567</SPAN>[/TD]
[TD]S</SPAN>[/TD]
[TD]EUR/GBP</SPAN>[/TD]
[TD]EUR</SPAN>[/TD]
[TD]125</SPAN>[/TD]
[TD]GBP</SPAN>[/TD]
[TD]100</SPAN>[/TD]
[TD]29/01/2013[/TD]
[/TR]
[TR]
[TD]123</SPAN>[/TD]
[TD]S</SPAN>[/TD]
[TD]GBP/USD</SPAN>[/TD]
[TD]GBP</SPAN>[/TD]
[TD]100</SPAN>[/TD]
[TD]USD</SPAN>[/TD]
[TD]170</SPAN>[/TD]
[TD]29/01/2013[/TD]
[/TR]
[TR]
[TD]999</SPAN>[/TD]
[TD]S</SPAN>[/TD]
[TD]EUR/GBP</SPAN>[/TD]
[TD]EUR</SPAN>[/TD]
[TD]125</SPAN>[/TD]
[TD]GBP</SPAN>[/TD]
[TD]100</SPAN>[/TD]
[TD]28/01/2013[/TD]
[/TR]
[TR]
[TD]999</SPAN>[/TD]
[TD]P</SPAN>[/TD]
[TD]EUR/GBP</SPAN>[/TD]
[TD]EUR</SPAN>[/TD]
[TD]115</SPAN>[/TD]
[TD]GBP</SPAN>[/TD]
[TD]100</SPAN>[/TD]
[TD]29/01/2013[/TD]
[/TR]
</TBODY><COLGROUP><COL><COL><COL span=5></COLGROUP>[/TABLE]
Rules:
Based on 2 matching order numbers
currency = same
date = same
purchase and sale = should be one of each amongst the two order number entries
either amt 1 or amt 2 must be the same (it wont necesirily always be amt 1)
outputs for sheet 2:
single order numbers
matching order numbers not meeting the above rules
(so with the above i would see order 567 as a single and 999 as a mismatch, due to date difference)
Is it possible to achieve the above in excel? Or would i need to use access? If someone could assist with the code that would be great!
Thanks!
I have a set of data like the below in sheet 1, i need to match the data by order number and show differences as exeptions on sheet 2
[TABLE="width: 480"]
<TBODY>[TR]
[TD]Order</SPAN>[/TD]
[TD]Purchase/Sale</SPAN>[/TD]
[TD]Currency</SPAN>[/TD]
[TD]CCY 1</SPAN>[/TD]
[TD]AMT 1</SPAN>[/TD]
[TD]CCY 2</SPAN>[/TD]
[TD]AMT 2</SPAN>[/TD]
[TD]Date[/TD]
[/TR]
[TR]
[TD]123</SPAN>[/TD]
[TD]P</SPAN>[/TD]
[TD]GBP/USD</SPAN>[/TD]
[TD]GBP</SPAN>[/TD]
[TD]100</SPAN>[/TD]
[TD]USD</SPAN>[/TD]
[TD]160</SPAN>[/TD]
[TD]29/01/2013[/TD]
[/TR]
[TR]
[TD]567</SPAN>[/TD]
[TD]S</SPAN>[/TD]
[TD]EUR/GBP</SPAN>[/TD]
[TD]EUR</SPAN>[/TD]
[TD]125</SPAN>[/TD]
[TD]GBP</SPAN>[/TD]
[TD]100</SPAN>[/TD]
[TD]29/01/2013[/TD]
[/TR]
[TR]
[TD]123</SPAN>[/TD]
[TD]S</SPAN>[/TD]
[TD]GBP/USD</SPAN>[/TD]
[TD]GBP</SPAN>[/TD]
[TD]100</SPAN>[/TD]
[TD]USD</SPAN>[/TD]
[TD]170</SPAN>[/TD]
[TD]29/01/2013[/TD]
[/TR]
[TR]
[TD]999</SPAN>[/TD]
[TD]S</SPAN>[/TD]
[TD]EUR/GBP</SPAN>[/TD]
[TD]EUR</SPAN>[/TD]
[TD]125</SPAN>[/TD]
[TD]GBP</SPAN>[/TD]
[TD]100</SPAN>[/TD]
[TD]28/01/2013[/TD]
[/TR]
[TR]
[TD]999</SPAN>[/TD]
[TD]P</SPAN>[/TD]
[TD]EUR/GBP</SPAN>[/TD]
[TD]EUR</SPAN>[/TD]
[TD]115</SPAN>[/TD]
[TD]GBP</SPAN>[/TD]
[TD]100</SPAN>[/TD]
[TD]29/01/2013[/TD]
[/TR]
</TBODY><COLGROUP><COL><COL><COL span=5></COLGROUP>[/TABLE]
Rules:
Based on 2 matching order numbers
currency = same
date = same
purchase and sale = should be one of each amongst the two order number entries
either amt 1 or amt 2 must be the same (it wont necesirily always be amt 1)
outputs for sheet 2:
single order numbers
matching order numbers not meeting the above rules
(so with the above i would see order 567 as a single and 999 as a mismatch, due to date difference)
Is it possible to achieve the above in excel? Or would i need to use access? If someone could assist with the code that would be great!
Thanks!