02-12-20 03:00 PM
16-08-21 07:38 AM
26-01-22 10:10 PM
Hello Eric,
I used this ws.Range(myRange).RemoveDuplicates(Columns:=New Object() {1, 2}, Header:=1) and its working for me. But the problem is I have 21 columns to look for, not just 2 columns. So I had to do this and the code is working. But I hardcoded this. Just wondering if there is an alternative solution for this?
27-01-22 06:01 AM
Try message = "" Dim wb as Object = _ GetWorkBook(handle, workbook) Dim ws as Object = _ GetWorkSheet(handle, workbook, worksheet) Dim columnIndicesLst As List(Of Object) = New List(Of Object) For Each index In columnindices.Split(","c) columnIndicesLst.Add(1) Next Dim dup As Object = ws.Application.Range(Input_Range).RemoveDuplicates(columns:= columnIndicesLst.ToArray(), Header:=1) result = TrueCatch ex As Exception result = False message = ex.MessageEnd Try06-06-22 02:06 PM
07-06-22 02:25 PM
08-06-22 08:12 AM
"A:C" Now within this range, I know 1st column is name and 2nd column is section so my column indices will be 0 and 1 since indices start from 0 for any array. So I can pass the column indices as "0,1"08-06-22 03:01 PM
09-06-22 06:12 PM
09-06-22 06:30 PM
17-06-22 10:35 AM