I'm looking to create a vba code that would search and find close matches within a table.
Sample Data is attached!!!
I would like to find a potential match based on all of these criteria but in opposite directions (aka a buy and a sell). If it's not there, I created a code to find it in another database which has a master of all of the data.
1) It MUST match on Trade ID (Mandatory criteria).
2) If it matches on 4 of the 5 next items, it is a match (Company, Quantity, Time, Manager Name, OPPOSITE directions).
3) I want it to just say in my last field (Comments) - "Match found - Broken on _____", with _____ being what's wrong.
In the example above, the first two would be a match broken on Time (12:05 vs 12:06). Nothing else would be a match in this document (MH156 trades are off by a lot of things so it wouldn't fit the criteria).
Anyone that can help me code this via VBA or a query would be a HUGE help!!
Thanks!!
M
Sample Data is attached!!!
I would like to find a potential match based on all of these criteria but in opposite directions (aka a buy and a sell). If it's not there, I created a code to find it in another database which has a master of all of the data.
1) It MUST match on Trade ID (Mandatory criteria).
2) If it matches on 4 of the 5 next items, it is a match (Company, Quantity, Time, Manager Name, OPPOSITE directions).
3) I want it to just say in my last field (Comments) - "Match found - Broken on _____", with _____ being what's wrong.
In the example above, the first two would be a match broken on Time (12:05 vs 12:06). Nothing else would be a match in this document (MH156 trades are off by a lot of things so it wouldn't fit the criteria).
Anyone that can help me code this via VBA or a query would be a HUGE help!!
Thanks!!
M
Attachments
Last edited: