I'm trying do some like this
For Each ws In ThisWorkbook.Worksheets
ws.Activate
If ws.Name <> "Estatística" Then
Range("H9").Formula = "=COUNTIF(D9:D308;1)"
End If
Next ws
But it gives the error "Application defined or object defined error". The same error doesn't happen if a use another formula, like "=SUM(H9:H13)" for example.