There are a few steps in the logic to do this and I had to come up with an example to demonstrate it. Essentially, I am assuming each now has a unique identifier. In my example it is ProductID
The above represents the current data. As per your requirements, new data is downloaded. Below is an example of how that may look:
As you can see, not only are there new products but some product prices have changed. As you stated, you want to replace a row if a certain column value has changed (L in your case but “Price” in my example) and add any new data rows.
The attached workflow:
- Reads both tables to datatables;
- Adds a concatenated column to both (ProductID+Price), this is used to compare changes in Price for matching Products;
- The For Each loops cycle through the new data, identifying new rows, adding them to the output datatable.
- They also look at already existing rows and comparing the price. If the price had been updated, this is carried out and output to the final datatable.
Hopefully the simple example I have shown will be close to what you need given what you have asked.
CompareData.zip (9.7 KB)