Checking a value in excel more than once

Hi all,
Can anyone please guide me of how to check if certain value appears twice in excel.
I had used for each loop to check the value has occurred more than once or not,But if the excel has more records it takes more time to check the value.
Is there any short way to check the value is occurred more than once or not?.

Fine
–if we want to validate for each row with each value whether it has repeated or not, then we need to go with for each row loop as you did
–but if we want to validate as a whole with total row count difference with and withou duplicates then we can use REMOVE DUPLICATE ROWS where pass the datatable variable as input and mention the same datatable variable name as output
–now use a assign activity before and after this REMOVE DUPLICATE ROWS activity
like this yourdatatable.Rows.Count.ToString

which will give us the difference as a whole term

hope this would help you
Cheers @sanju_RPA

1 Like

@sanju_RPA,

Please try to use the below step if it is relevant to your requirement.

Read the data and stored in one datatable variable of DT.
Then take the distinct value from the above datatable for that you need to create new Variable by using assisgn activity.
DT1=DT.Defaultview.ToTable(True,“columnname”).
Followed by for each loop and if ((row1(“Columnname”).ToString.Contains(row2(“Columnname”).ToString)) to get a repeated value.

Thanks,
Mohanraj.SCanteen.zip (40.2 KB)

1 Like

@sanju_RPA once you have stored the data in a data table then get the count of your column and group by the same column.

Hi, Mohanraj.S
The xaml file that you posted has missing activity when I tried to open it. Can you repost the file? Thank you!

@Bee1,

Please find the same.

Thanks,
Mohanraj.SCanteen.zip (40.2 KB)

Thank you, Mohanraj.S !

Bee

Hi, Mohanraj
I think you xaml file, canteen.zip is complaining missing NU1102: Unable to find package MyPackage 1 with version(=1.0.0…). Where can I find this?