Sub proba() MsgBox brojacCelija("nadi ovo", Range("A1:A100")) End Sub Function brojacCelija(traziStr As String, region As Range) As Long Dim cell As Range For Each cell In region If (cell.Value = traziStr) Then brojacCelija = brojacCelija + 1 End if Next cell End Function