Hi Nicholas,
Function Testa(RangeA as Range) as Double
What do you want the function to do?
Maybe this example function is af help to you
--
Kind regards,
Niek Otten
Microsoft MVP - Excel
==========================================================
Function VLookupSort(SearchArgument As Range, SearchTable As Range, _
ColumnNo As Long, Optional SortDirection, Optional NotFound)
' Works as Vlookup, exact match (4th argument = FALSE)
' But takes advantage of the fact that a table is sorted
' and thus is much faster
' Also permits table to be sorted descending (Sortdirection -1)
' Optional argument for return value if item not found, defaults to #NA
Dim ItemFound
If IsMissing(SortDirection) Then SortDirection = 1
ItemFound = Application.Match(SearchArgument, Intersect(SearchTable, SearchTable.Cells(1).EntireColumn), _
SortDirection)
If SearchTable(ItemFound, 1) <> SearchArgument Then
If IsMissing(NotFound) Then
VLookupSort = CVErr(xlErrNA)
Else
VLookupSort = NotFound
End If
Else
VLookupSort = _
SearchTable(ItemFound, ColumnNo)
End If
End Function
==========================================================
|I couldn't make a function with a matrix as input. My idea is to write a
| macro (a function in VBA for Excel) witch reeds a matrix (of variable size)
| and develops a number. The problem is that I can't find the way to write the
| function with multiple inputs (like the function SUM(A1:A5) )
|
| Does anyone knows how to do that?
|
| Nicholas
|