Greetings, im very noob so please be gentle.
I have this:
For i = 1 To 200
.
.
.
atuais = Sheets("Geral").Range("$L$12:$L$32").Value
velhos = Sheets("Geral").Range("$H$12:$H$32").Value
'Compare 2 columns (value by value)
For j = LBound(atuais) To UBound(velhos)
If ((atuais(j, 1) > velhos(j, 1)) And (atuais(j, 1) - velhos(j, 1) < 0.01)) Or ((atuais(j, 1) < velhos(j, 1)) And (velhos(j, 1) - atuais(j, 1) < 0.01)) Or
(atuais(j, 1) = velhos(j, 1)) Then Exit For
Next j
Next i
What I would like to happen is:
-It verifies the "If condition" for all the values on the rows of "atuais" and "velhos"
-If the condition is verified, all the values are almost the same (error of 0.01) or equal to each other, exits the "For i", right now it only exits de "For j".
Cheers
Bookmarks