Skip to content

Instantly share code, notes, and snippets.

@tegila
Last active August 29, 2015 14:27
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 tegila/0356730fdc9edfd47812 to your computer and use it in GitHub Desktop.
Save tegila/0356730fdc9edfd47812 to your computer and use it in GitHub Desktop.
Percorre a fatura do ML procurando por roubos
Sub getTheRabit()
Dim i As Integer, j As Integer, k As Integer
Dim cuDate As String, newDate As String
Dim temp As String
With Worksheets("Report")
i = 16
Do Until .Cells(i, 2).Value = ""
k = 16
cuDate = .Cells(i, 2).Value
Do Until .Cells(k, 2).Value = ""
newDate = .Cells(k, 2).Value
If cuDate = newDate And .Cells(i, 8).Value = -.Cells(k, 8).Value Then
.Cells(k, 9).Value = "OK"
.Cells(i, 9).Value = "OK"
Exit Do
End If
k = k + 1
Loop
i = i + 1
Loop
End With
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment