Skip to content

Instantly share code, notes, and snippets.

@alexdantas
Created January 26, 2014 15:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexdantas/8634625 to your computer and use it in GitHub Desktop.
Save alexdantas/8634625 to your computer and use it in GitHub Desktop.
Private Sub CommandButton1_Click()
Dim cpfs As Range
Set cpfs = ThisWorkbook.Worksheets("pdf").Range("B3:B169")
Dim cpf As Range
Dim new_cpfs As Range
Set new_cpfs = ThisWorkbook.Worksheets("09").Range("C2:C194")
Dim new_cpf As Range
Dim j As Integer
j = 2
For Each new_cpf In new_cpfs.Cells
For Each cpf In cpfs.Cells
If new_cpf.Value = cpf.Value Then
ActiveWorkbook.Worksheets("09").Cells(j, 24).Value = "x"
End If
Next cpf
j = j + 1
Next new_cpf
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment