Comparing 2 dataTable and filtering according to row values

Hi, i have 2 dataTable which you can find in the excel “Sheet1” and “Sheet2”. As you can see these dataTables have different columns. I need to compare these dataTables and take only the different values regarding only for 2 column’s values.

Example; in Shet1 - H3:I7 (range) - there are same values in Sheet2 but The column “Oran” and “Tutar” are different at some of them. So in a nutshell i need to filter the dataTable Sheet1 according to the “Tutar” and “Oran” column’s values for same rows. Could you help me on that, please?

sample.xlsx (16.3 KB)

*the result ; the result should give me the row4,6 and 7 in Sheet1. Because the values in it “Tutar” same in Sheet2 but “Oran” is different.

  • if you can do that with LINQ methods or query syntax, it would be great for me

Hi @Arif_Kilic,

Can you just attach the expected output from sheet1 and sheet2 and with which column we are comparing in both the sheets?

Hi, thanks for replying. I added “ExpectedResult” page to excel. That table i want to have it in Studio

sample.xlsx (16.3 KB)

In both sheets we need to compare the “Tutar” and “Oran” columns. When you see the “ExpectedResult” page you will understand. There are same number in Sheet1 and Sheet2 for “Tutar” column but if you look at carefully the “Oran” column values are different. So i need to compare both “Tutar” and “Oran” values. If there are differences in the same row each of column’s values i have to take this row from sheet1.


  1. I don’t see the 3rd(highlighted) value in Sheet2 then how come you are getting this in Expected Result?

  2. Are we comparing Sheet1 “Tutar” & “Oran” with Sheet2 “Tutar” & “Oran”? If yes then we are keeping the unmatched values from Sheet1, right? then below will be the output as per my findings — (If I am correct then attaching my solution, give it a try)

image (14.4 KB)

@Arif_Kilic ,

What you are saying is really very confusing, coz the 70 is not in sheet2 then there is no sense in comparing as there is no match to compare from Sheet2.

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