I changed the function to =myFunc(a1) and copied and pasted into the other cells and got the expected result. I tried to change the coding to get what I wanted like this.
Function myFunc(ParamArray rng()) As Range
Dim i As Long
Dim cell As Range
Dim tmp_rng As Range
For i = LBound(rng) To UBound(rng)
For Each cell In rng(i)
If cell.Value > 10 Then
tmp_rng(i) = True
ElseIf cell.Value <= 10 Then
tmp_rng(i) = False
End If
Next cell
Next i
myFunc = tmp_rng
End Function
and got this result where selected the output cellse and Ctl-Shif-Entered the following function =myFunc(MyRange) and got the following.
17 1 4 7
15 16 16 5
1 18 16 18
4 14 5 6
4 8 12 14
11 4 1 2
14 18 6 13
16 18 8 9
#VALUE! #VALUE! #VALUE! #VALUE!
#VALUE! #VALUE! #VALUE! #VALUE!
#VALUE! #VALUE! #VALUE! #VALUE!
#VALUE! #VALUE! #VALUE! #VALUE!
#VALUE! #VALUE! #VALUE! #VALUE!
#VALUE! #VALUE! #VALUE! #VALUE!
#VALUE! #VALUE! #VALUE! #VALUE!
#VALUE! #VALUE! #VALUE! #VALUE!
Am I trying to do somehting that can't be done?
EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com