Sub loopchange()
Application.ScreenUpdating = False
Application.EnableEvents = False
Dim level As Integer
Range("AF3").Select
Do
ActiveCell.Offset(0, -31).Select
If ((Right(ActiveCell.Value, 1)) = 2) Then
ActiveCell.Offset(0, 28).Select
level = Left(ActiveCell.Value, 4)
ActiveCell.Offset(1, -28).Select
End If
If ((Right(ActiveCell.Value, 1)) = 3) Then
ActiveCell.Offset(0, 28).Select
If (level = Left(ActiveCell.Value, 4)) Then
ActiveCell.Offset(0, 3).Select
ActiveCell.Value = "No CTH"
ActiveCell.Offset(0, -3).Select
ElseIf (Levels <> Left(ActiveCell.Value, 4)) Then
ActiveCell.Offset(0, 3).Select
ActiveCell.Value = ""
ActiveCell.Offset(0, -3).Select
End If
ElseIf ((Right(ActiveCell.Value, 1)) <> 2 Or (Right(ActiveCell.Value, 1)) <> 3) Then
ActiveCell.Offset(0, 28).Select
End If
ActiveCell.Offset(1, 3).Select
Loop Until IsEmpty(ActiveCell.Offset(0, -31))
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub
@ejbytes Eu já resolvi isso.Graças muito pelas suas orientações para estes dias: D Tenha um bom dia