Control function output



How can I control the cells to which I output an array of values from a function?

I am writing a plugin function.

As an example, looking at the adtest() function, the output array is specified in the function as (1,3) or  1 column and 3 rows. This is fine, as the user preselects  3 cells in one column. If you select any more you will get a #N/A returned in the extra cell. This extra cell(s) cannot be removed by the user without a redo of the array entry i.e delete everything and re-select only the cells needed.

For the function I am writing I do not know the array output size - it is variable. What I would like to do is allow the user to specify only the first cell and the function to control the output to the sheet. i.e is there a way to select the sheet cells from within the function to which the function will then output the array?

I’d be grateful if someone familiar with the code could indicate if this has been done somewhere and where I could find an appropriate example that may give me a clue as to how cell selection is controlled or stored at run time.

Thanking you in advance.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]