Serving the Quantitative Finance Community

 
User avatar
dkkchan
Topic Author
Posts: 1
Joined: November 10th, 2003, 1:54 pm

worksheet function help

March 22nd, 2005, 3:20 pm

I was having a hard time to get rid of the necessity of pressing Ctrl+Shift+Enter after entering a function that return a matrix/array. My customised function will return x rows and y columns. Everytime is different. Since x and y are unknow to me when that time I initialise the function, I have to pre-select the size of the array in the spreadsheet by trial & error. The problem is particular difficult to me since any subroutine within my customised function that targets to write to the other cells that is not the cell (original) one enters when the function is initialised, would be ignored.Is there any method (subroutine/function) to expand the results (matrix/array) fully by displaying the only rows up to x and columns up to y immediately after keying "=myfnc(,,,)" without pre-select cells and keying {Ctrl+Shift+Enter}.thx a lotdan
 
User avatar
spursfan
Posts: 2
Joined: October 7th, 2001, 3:43 pm

worksheet function help

March 22nd, 2005, 5:03 pm

i don't think so - better to output a matrix with fixed maximum dimensions - and leave some rows and columns empty