Bom dia
Estou programando VBA no excel de certo modo "simples"
Consiste em conferir algumas condição que se for valida em todas as celulas então amco = "amco+1"
Porém esta dando o "Erro de tempo de execução 13" na linha do começo da condição SE, das varias existentes
Não sei mais o que fazer estou a dois dias tentando e não consigo uma solução,
PS: A quantidade de IF e END IF esta coerente
Segue a macro:
Sub Atualiza()
Dim i, j, p, q, amco, ampr, Cellule As Integer
i = 2
j = 13
ampr = 0
amco = 0
Sheets("Input").Select
p = Cells(Cells.Rows.Count, "A").End(xlUp).Row
q = Cells(1, Cells.Columns.Count).End(xlToLeft).Column
For i = 2 To p
If Cells(i, 13) = "CO" Or "" Then 'Erro ocorre nesta linha
If Cells(i, 14) = "CO" Or "" Then
If Cells(i, 15) = "CO" Or "" Then
If Cells(i, 16) = "CO" Or "" Then
If Cells(i, 17) = "CO" Or "" Then
If Cells(i, 18) = "CO" Or "" Then
If Cells(i, 20) = "CO" Or "" Then
If Cells(i, 22) = "CO" Or "" Then
If Cells(i, 23) = "CO" Or "" Then
If Cells(i, 24) = "CO" Or "" Then
If Cells(i, 25) = "CO" Or "" Then
If Cells(i, 26) = "CO" Or "" Then
If Cells(i, 28) = "CO" Or "" Then
If Cells(i, 29) = "CO" Or "" Then
If Cells(i, 30) = "CO" Or "" Then
If Cells(i, 31) = "CO" Or "" Then
If Cells(i, 32) = "CO" Or "" Then
If Cells(i, 33) = "CO" Or "" Then
If Cells(i, 35) = "CO" Or "" Then
If Cells(i, 37) = "CO" Or "" Then
If Cells(i, 39) = "CO" Or "" Then
If Cells(i, 41) = "CO" Or "" Then
If Cells(i, 43) = "CO" Or "" Then
If Cells(i, 45) = "CO" Or "" Then
If Cells(i, 47) = "CO" Or "" Then
If Cells(i, 49) = "CO" Or "" Then
If Cells(i, 50) = "CO" Or "" Then
If Cells(i, 52) = "CO" Or "" Then
If Cells(i, 54) = "CO" Or "" Then
If Cells(i, 55) = "CO" Or "" Then
If Cells(i, 57) = "CO" Or "" Then
If Cells(i, 58) = "CO" Or "" Then
If Cells(i, 59) = "CO" Or "" Then
If Cells(i, 60) = "CO" Or "" Then
If Cells(i, 61) = "CO" Or "" Then
If Cells(i, 62) = "CO" Or "" Then
amco = amco + 1
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
Next
MsgBox "você ainda possui " & ampr & " e "& amco &" amostras "
End Sub