enfantter
01-09-2010, 08:35 AM
Hi all,
i have written the following code for a function that is supposed to count all saturdays for example
Function betsum(rg, navn)
Dim tilsum As Double
Dim nRow As Range
For Each nRow In rg
If nRow.Cells(1, 1).Value = navn Then
tilsum = tilsum + 1
End If
Next nRow
betsum = tilsum
End Function
in the column though is dateentries ..
so im looking for a way to alter the code for something like the following,
If dayof(nRow.Cells(1, 1).Value) = navn Then
tilsum = tilsum + 1
End If
is this possible ?!
i have written the following code for a function that is supposed to count all saturdays for example
Function betsum(rg, navn)
Dim tilsum As Double
Dim nRow As Range
For Each nRow In rg
If nRow.Cells(1, 1).Value = navn Then
tilsum = tilsum + 1
End If
Next nRow
betsum = tilsum
End Function
in the column though is dateentries ..
so im looking for a way to alter the code for something like the following,
If dayof(nRow.Cells(1, 1).Value) = navn Then
tilsum = tilsum + 1
End If
is this possible ?!