Hi, I have spent a significant amount of time trying to figure out how to do this before coming here, unfortunately given I rely on the macro recorder and other's code examples I am unable to resolve this so many thanks in advance!
I have two lists which 'should' reconcile. Within each list/row is several variables - buy/sell (direction), amount, rate and currency - these all need to match, among other entries that won't need to be matched.
The difficult part is that there may be duplicates within each list as not all users can see all entries. For example, say there are 3 of the same entries in only one sheet, but 2 in the other (all identical however). I need to avoid confirming they match if the 3 identical entries match against a single entry in the other list (so needs to be able to treat each entry as unique). I thought of resolving this issue by deleting a matching row every time there is a match, hence in the above example, once it matched the first 2 of the 3 entries, the script will be unable to match the last (3rd) entry given the other 2 were deleted.
I would then copy the remaining entries (the entire row of that particular list only) from the list that has deleted entries and copy them into an unmatched sheet. I would then reverse the process and do it the other way around to identify discrepancies in the initial list.
Perhaps someone can suggest a smarter way of doing this over all? Perhaps prescribe each row in each list a unique variable and then match them off, extracting any remaining unmatched variables?
Thanks
EDIT: To clarify, the comparable fields are not next to one another, so the code needs to accommodate comparing fields within a row of differing positions.
Bookmarks