View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default 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.