How to get duplicate values from 2 columns?


I have two DT with one column each one.

I would like to get a third DT with the duplicated values.

How could I do?


Thanks. After doing so how could I get only the duplicated values?

You need only duplicated values ?

Yes. After merging both data tables i need to get only the duplicated values

You can do like this
Build Datatable–DT3
Use For each row For DT1
Then in that use

  1. Way
    LookUp range : Range will be second dt sheet in excel: output- LR

IF : String.IsNullOrEmpty(LR)
Then leave it
Add data row-----Data Array will be {Row(0)…tostring}

After For each row use Write Range

For Each Row DT1
For Each Row1 DT2
If Row1(0).tostring=Row(0).Tostring
Add data Row

End of for each
Write range

Main.xaml (12.6 KB) Test.xlsx (9.5 KB)

1 Like

Hi @EngAnalyst,

Please use join datatable activity use the column name and join should be a inner join . This is the simplest way to get items thats available in both datatables.

Thank You

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