ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   User Defined Function to run procedure (https://www.excelbanter.com/excel-programming/395027-user-defined-function-run-procedure.html)

[email protected]

User Defined Function to run procedure
 
I want to create a User Defined Function which runs other procedues to
populate an array of cells. i.e.

User inputs "=GetMyData(arg1, arg2, arg3 ...)" into cell A1

Cells A3 to Bn is populated with relevant data.

Any pointers would be greatly appreciated.

Toy.


Mangesh

User Defined Function to run procedure
 
Probably you need a UDF returning a FormulaArray. Check the following
link:

http://www.developersdex.com/vb/mess...2677&r=5859124


Mangesh


On Aug 8, 3:28 pm, wrote:
I want to create a User Defined Function which runs other procedues to
populate an array of cells. i.e.

User inputs "=GetMyData(arg1, arg2, arg3 ...)" into cell A1

Cells A3 to Bn is populated with relevant data.

Any pointers would be greatly appreciated.

Toy.




Tom Ogilvy

User Defined Function to run procedure
 
UDF's can only return a value to the cell in which they are entered. They
can read the values of other cells, but can not alter the excel environment
such as formatting or changing colors or changing values in other cells.

Mangesh is suggesting that an Array formula might be appropriate. In this
case, the formula is entered in all the cells where a value will be returned.
(but the cells must be contiguous). Just make sure you read the link all
the way through. The poster Jim apparently wasn't knowledgeable about UDF's
being used as array formulas and gave some misinformation corrected by Peter
T.

--
Regards,
Tom Ogilvy




" wrote:

I want to create a User Defined Function which runs other procedues to
populate an array of cells. i.e.

User inputs "=GetMyData(arg1, arg2, arg3 ...)" into cell A1

Cells A3 to Bn is populated with relevant data.

Any pointers would be greatly appreciated.

Toy.



[email protected]

User Defined Function to run procedure
 
Thanks guys,

This type of functionality is included in the Bloomberg addin, I think
it must have been coded in C+. I'm not quite at that stage but had
already started to look into xll addins.

Regards,

Toy.



All times are GMT +1. The time now is 11:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com