PC Review


Reply
Thread Tools Rate Thread

Array in User Function

 
 
Amish
Guest
Posts: n/a
 
      1st Jul 2009
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
 
Reply With Quote
 
 
 
 
Charles Williams
Guest
Posts: n/a
 
      2nd Jul 2009
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" <(E-Mail Removed)> wrote in message
news:c54983c7-e0c5-4583-a638-(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
Joel
Guest
Posts: n/a
 
      2nd Jul 2009

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" <(E-Mail Removed)> wrote in message
> news:c54983c7-e0c5-4583-a638-(E-Mail Removed)...
> > 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
> >

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: User define function that reply array Chip Pearson Microsoft Excel Programming 0 1st Dec 2008 04:28 PM
Passing an array in a user defined function =?Utf-8?B?UGV0ZXIgTQ==?= Microsoft Excel Programming 5 27th Jun 2008 10:45 PM
Using user function (vba) with sqrt(array)-only first answer =?Utf-8?B?QXdpbGw=?= Microsoft Excel Programming 1 24th Aug 2007 01:54 PM
User Defined Array Function =?Utf-8?B?UGZsdWdz?= Microsoft Excel Programming 6 31st Jul 2007 07:46 PM
Can an array formula be used in a user defined function? stratasmith Microsoft Excel Misc 3 5th Jul 2004 07:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:40 PM.