Function Saberi(Region As Range) '******************************************** 'Sabiranje celija sa provjerom dali je u ' celiji num,ericka vrijedost '******************************************** Dim Celija As Range Dim Suma As Double Dim Vrijednost As Double Dim Vrs As String For Each Celija In Region.Cells Vrs = Celija.Value Vrijednost = Celija.Value If Len(Vrs) = Len(Format$(Vrijednost)) Then Suma = Suma + Vrijednost Else MsgBox "Vrijednost u polju" & vbCr _ & Celija.Address & vbCr _ & "Nije numericka" Celija.Select Exit Function End If Next Celija Saberi = Suma End Function