Remove duplicate values from excel

Hi,
I Want to delete entire row if the values are duplicate but one the condition is "theere are two column in excel with name “company name” and “date”. And I want to delete duplicate values from "company name " but values in “date” column differ even though “company name” are same.
In this case BOT is not removing duplicate value because date is different even though name is same.
Can you please help me to this.

Buddy @sshitol

You can use remove duplicate range activity buddy

Hi @sshitol

image
Hope this helps!

DataTable FilterDt= MainDataTable.DefaultView.ToTable(true,“Company Name”,“Date”)

or use Remove Duplicate Rows Activity

MainDT.AsEnumerable().GroupBy(Function(a) a.Field(Of String)(“Company Name”)).Select(Function(b) b.First).CopyToDataTable() - This is for finding only unique company

2 Likes

hi @Palaniyappan,

As I said in my requirement values in “Date” column is not same . So in such case BOT unable to remove duplicate values because “Company Name” column has same value but “Date” column is having different value.table

Did you try what @Lipika_Porey mentioned before?

or use Remove Duplicate Rows Activity
MainDT.AsEnumerable().GroupBy(Function(a) a.Field(Of String)(“Company Name”)).Select(Function(b) b.First).CopyToDataTable() - This is for finding only unique company

Or do this in assign activity (Filters company name irrespective of date column):
FilterDT = MainDT.DefaultView.ToTable(true,“Company Name”)

its working with this formula

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