View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Kiwi Trader Guy Kiwi Trader Guy is offline
external usenet poster
 
Posts: 5
Default ForumulaArrays - help needed.

Thanks for your response.

Unfortunately this only returned the first cell of the selection, and as I
was using a CSE (CNTL-SHIFT-ENTER) function, this was just the top of the
range of the column that was selected.

Perhaps I need to return a range or somehow set all the values in the range
in the function - but I don't quite understand how these CSE functions are
supposed to work.

Would be good to see the function definition of say MINVERSE as this does
it.

Thanks in advance



Tom Ogilvy wrote:

set rng = application.Caller
rw = rng.row
col = rng.column

--
Regards,
Tom Ogilvy

"Kiwi Trader Guy" wrote in message
...
Hi

I want to write a simple FormulaArray type function that will take a
Range as input, and return a value subect to where the cell is in
reference to the input range.

i.e. say a it was just to reverse the input

1 - 4
2 - 3
3 - 2
4 - 1

This is a trivial example, but what gets me is know where i am in the
destination cell so that I can return the right value from the input
range.

Does that make sense?


Function foo(Rin As Range)

' foo = Rin.Row
'foo = Rin.Rows.Count

'BUT what is the row/cell value of the cell that called me??????

End Function