starheartbeam
New Member
- Joined
- Aug 8, 2018
- Messages
- 18
I am trying to compare two file. I receive a file once a week. And I need to compare last week’s file to this week’s file. I have them both in the same file on two different tabs. One called Old and the other is called New. I need to look at these two file and see where the Location has changed on the New file and update it on a new tab called New_Location. This needs to be done in a macro as I have this file looking for other changes and all of those are working. I have created a key on both Old and New tab using the Item – State Date. This works great to give me the new locations if an item is mono sourced but if it is multi sourced I am getting items showing up that have not changed because it is whatever it gets to first in the file. Is there a way to code the macro to look at all the lines that fit the key and not just the first one it comes to?
Old
<tbody>
</tbody>
New
<tbody>
</tbody>
Here is what the results should show.
New_Location
<tbody>
</tbody>
Old
Item | Location | Start Date | Source | FileDate |
1234 | US | 01-APR | MULTI | 22-FEB |
1234 | FR | 01-APR | MULTI | 22-FEB |
9876 | CA | 01-MAY | MONO | 22-FEB |
8525 | CA | 01-JUN | MULTI | 22-FEB |
8525 | US | 01-JUN | MULTI | 22-FEB |
8525 | US | 01-MAY | MULTI | 22-FEB |
8525 | CA | 01-MAY | MULTI | 22-FEB |
<tbody>
</tbody>
New
Item | Location | Start Date | Source | FileDate |
1234 | CA | 01-APR | MULTI | 28-FEB |
1234 | FR | 01-APR | MULTI | 28-FEB |
9876 | US | 01-MAY | MONO | 28-FEB |
8525 | CA | 01-JUN | MULTI | 28-FEB |
8525 | US | 01-JUN | MULTI | 28-FEB |
8525 | US | 01-MAY | MULTI | 28-FEB |
8525 | FR | 01-MAY | MULTI | 28-FEB |
<tbody>
</tbody>
Here is what the results should show.
New_Location
Item | Location | Start Date | Source | FileDate |
1234 | CA | 01-APR | MULTI | 28-FEB |
9876 | US | 01-MAY | MONO | 28-FEB |
8525 | FR | 01-MAY | MULTI | 28-FEB |
<tbody>
</tbody>