Use a variant and test its type to find out what kind of parameter has been
used:
If TypeName(Lookup_Columns) = "Range" Or VarType(Lookup_Columns) = vbArray
Then
etc.
the parameter could be a range, a scalar value or a one or two dimensional
array of constants.
regards
Charles
______________________
Decision Models
FastExcel 2.1 now available
www.DecisionModels.com
"Arvi Laanemets" wrote in message
...
Hi
How to create an UDF which can have as parameter either the cell range or
an
array, i.e both syntaxes in examples below will work:
=MyFunction(A2,B2,OtherSheet!$A$2:$A$7)
or
=MyFunction(A2,B2,{2;3;4;5;6;7})
Thanks in advance
--
When sending mail, use address arvil<attarkon.ee
Arvi Laanemets