Last active
August 29, 2015 14:27
-
-
Save tegila/0356730fdc9edfd47812 to your computer and use it in GitHub Desktop.
Percorre a fatura do ML procurando por roubos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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