ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Array in User Function (https://www.excelbanter.com/excel-programming/430602-array-user-function.html)

Amish

Array in User Function
 
I'm trying to fill an array in a user-defined function and I get the
following error:
Compile error: Can't assign to array

I've tried to input the text as strings and using the address of the
same data in a worksheet and I get the same error. Is there a trick to
this or are arrays not allowed in functions?

Thanks

Charles Williams

Array in User Function
 
Yes you can use arrays in UDFs.

Please post your UDF code so we can see what the problem is.

Charles
___________________________________
The Excel Calculation Site
http://www.decisionmodels.com

"Amish" wrote in message
...
I'm trying to fill an array in a user-defined function and I get the
following error:
Compile error: Can't assign to array

I've tried to input the text as strings and using the address of the
same data in a worksheet and I get the same error. Is there a trick to
this or are arrays not allowed in functions?

Thanks




joel

Array in User Function
 

Are you trying to pass a range object into the function, use an array inside
the function, or return the array?

"Charles Williams" wrote:

Yes you can use arrays in UDFs.

Please post your UDF code so we can see what the problem is.

Charles
___________________________________
The Excel Calculation Site
http://www.decisionmodels.com

"Amish" wrote in message
...
I'm trying to fill an array in a user-defined function and I get the
following error:
Compile error: Can't assign to array

I've tried to input the text as strings and using the address of the
same data in a worksheet and I get the same error. Is there a trick to
this or are arrays not allowed in functions?

Thanks






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

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