Notice: Undefined offset: 2 in /home2/icentarb/public_html/icentar/classes/class.permissions.php on line 735
Sub proba()
Dim rng As Range
Set rng = Range(Cells(1, 1), Cells(9, 1))
MsgBox Saberi(rng)
End Sub
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
For Each Celija In Region.Cells
If isBroj(Celija.Value) = True Then
Vrijednost = Celija.Value
Suma = Suma + Vrijednost
End If
Next Celija
Saberi = Suma
End Function
Function isBroj(ByVal Value As String) As Boolean
If IsNumeric(Value) = False And Application.WorksheetFunction.IsNumber(Value) = False Then
isBroj = False
ElseIf IsNumeric(Value) =