Remove duplicate base on cell value

Number. Value
14500. a
17377. a
83788. c
74647. h
73647. c
and so on above is a excel i want to remove duplicate value from the value column and the output is like
Number. Value
14500. a
83788. c
74647. h

DT.Asenumerable.Groupby(Function(r) r(“Value”).Tostring).Select(Function(g) g.First).copytodatatable

you can use group by query
outputDataTable = dt.AsEnumerable().GroupBy(Function(x) x(“ColNamewhichyou want to group by”).ToString)[Select](Funtion(y) y.First()).CopyToDataTable()

Hey
you can follow this,
RemoveDuplicateRows.xaml (5.3 KB)
thanks

need to without using query

use remove dublicates activiy

need to do using for each

Hello @Dheeraj_Chourasiya

Welcome to the community!

Is there any specific reason to use for each. This would take longer time to complete the automation. Hence, it is best practise to use LINQs/other available activities when processing large amount of data

No specific reason but we can use any loop or any method instead of Linq and groupby method. plz help me with that

I think with these cases. The using group or Lin.Q is the best of solution.

The using for each loop only will very complex and make long steps.

but it is my task to do with that

1 Like

no specific just a task to do it try everything but didn’t got anything

Pls check as attached file.
Duplicate.zip (110.9 KB)

not working it is

its not working

anyone help