Using If function for Excel


Is there a way to use the If function to determine if a row in excel is the same from column A to K.

If this is the case, then the row should overwrite the existing row.

If not, then the new row should be an append range.

NB: it is important that the new row replace the old row on the same location, if column A to K is the same.

I hope that someone can help me out with this?

This is a little illogical I think. You are referring to two rows wherein your task seems to be just working out if a single row has the same values from column A to K.

Are you working with two excel tables?

Hi Ronan,

I am working with a table that keeps getting updated each day online. This means that I am downloading it every day, but the column L is changing.

So I have to get the latest data every day, and if the value in column L changes, then the row should be replaced. And if the row was not existing before, then it should be added.

I hope that this makes sense?


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. (9.7 KB)

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.