Tyrone H Faulkner 4.Oct.08 04:48 AM a Web browser 1-2-3All ReleasesAll Platforms
The following function takes a range and integer as parameters and returns an integer. It works if called from within lotusscript but not when called from 1-2-3 as follows: @nooccur(a1..g1,9). I think it has to do with the way I am passing the range. Any help would be appreceated.
Function NoOccur (array As range,compare As Integer) As Integer
Dim indx As Integer
indx = 0
Dim rangetoiterate As ranges
Set rangetoiterate = array.cells
Forall onecell In rangetoiterate
If onecell.cellvalue = compare Then
NoOccur = NoOccur + 1
End If
End Forall
End Function