Hi all, can anybody help me with a vba code, am using the following vba code to extract duplicate tradeid's and move them to a new worksheet, its not working well any help please,

Reply
Occasional Contributor
Posts: 11

Hi all, can anybody help me with a vba code, am using the following vba code to extract duplicate tradeid's and move them to a new worksheet, its not working well any help please,

Sub CutRemoved()

Dim Rng As Range, i As Long

  Application.ScreenUpdating = False

  Set Rng = Range("C3:C" & Range("C" & Rows.Count).End(xlUp).Row)

  For i = Rng.Rows.Count To 1 Step -1

  If Application.WorksheetFunction.CountIf(Rng, Cells(i, "C")) > 1 Then

  lr = Sheets("Removed").Cells(Rows.Count, "DH").End(xlUp).Row + 1

  Rows(i).EntireRow.Cut Destination:=Sheets("Removed").Range("C" & lr)

  Rows(i).EntireRow.Delete

  End If

  Next i

  Application.ScreenUpdating = True

End Sub

Been trying to move the tradeid's from column C to a new worksheet that starts in C too, thanks.

Frequent Contributor
Posts: 75

Re: Hi all, can anybody help me with a vba code, am using the following vba code to extract duplicate tradeid's and move them to a new worksheet, its not working well any help please,

Hi,

I'm afraid this isn't a VBA forum. I wonder whether you are in the right forum after all. I guess it would be simply be a waste of time for you and others when you seek answers for VBA questions unless it is some sort of SAS in conjunction with other technologies.

Mark

I am not sure whether or not a SAS moderator is in place.:smileyalert:

Ask a Question
Discussion stats
  • 1 reply
  • 161 views
  • 0 likes
  • 2 in conversation