How to find duplicate count in each column and paste next sheet in excel

Hi Guys,

I have used below code,

(From p In DT1.AsEnumerable() Group By x= New With { Key.a =p.Item(item)} Into Grp = Group Select DT1.Clone.LoadDataRow (New Object() {grp(0)(0).toString+" Count is "+grp.Count.toString},False)).CopyToDataTable

I got a output in below ,

dup3

but i need below format

Dup4

I attached Full code also,

Please any one help this

Dup count.zip (9.0 KB)

Regards,
Raja G

Hi @Raja.G,

I have tried your use case, Please have a look and test it.

DistinctCount.xaml (16.5 KB) test.xlsx (9.9 KB)

Thanks!

1 Like

@kadiravan_kalidoss,
Thanks you ,I I’ll test