How to remove duplicates based on several columns

WalkingNerd

New Member
Hi cool cats,

I am trying to remove duplicates from a csv file. I want to transform the following VB code to the one that works on BP.

ActiveSheet.Range("A1:C100").RemoveDuplicates Columns:=Array(1,2), Header:=xlYes

Here are my trial. Could you help me to fix the issue?

Dim worksheet As Object
Dim colm() as string
worksheet = GetWorkbook(handle,Nothing).ActiveSheet
colm = split(Arr,",")
worksheet.Range(Rnge).RemoveDuplicates({colm},2)
 

Attachments

  • RemoveDuplicate-2.PNG
    28.6 KB · Views: 36
  • RemvoeDuplicate-1.PNG
    23.4 KB · Views: 28
Top