PC Review


Reply
Thread Tools Rate Thread

Array formulas cannot return strings longer than 255

 
 
Alok
Guest
Posts: n/a
 
      6th Mar 2008
Array functions, even in Excel 2007, seem to be limited to returning
strings shorter than 255 characters. To see this, enter the following
function as an array formula:

Public Function HOHO() As Variant
Dim v As Variant
ReDim v(2, 2)
v(0, 1) = "HOHO"
v(1, 1) = String(256, "a")
HOHO = v
End Function

Is there any way around this error?

Thanks,
Alok
 
Reply With Quote
 
 
 
 
Peter T
Guest
Posts: n/a
 
      6th Mar 2008
Pretty sure I recall seeing this "limitation" documented in an MS KB
article. Need to workaround, at the very least truncate any 255+ strings in
a array returned to a UDF. Perhaps place the excess into additional
element(s) of the array.

Regards,
Peter T

"Alok" <(E-Mail Removed)> wrote in message
news:adddc14a-6637-413d-bfb1-(E-Mail Removed)...
> Array functions, even in Excel 2007, seem to be limited to returning
> strings shorter than 255 characters. To see this, enter the following
> function as an array formula:
>
> Public Function HOHO() As Variant
> Dim v As Variant
> ReDim v(2, 2)
> v(0, 1) = "HOHO"
> v(1, 1) = String(256, "a")
> HOHO = v
> End Function
>
> Is there any way around this error?
>
> Thanks,
> Alok



 
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
Is there any way to use longer strings in formulas? baobob@my-deja.com Microsoft Excel Discussion 37 28th Jan 2008 10:58 PM
Formulas not evaluated, Formulas treated as strings =?Utf-8?B?Qm9iIFN1bGxlbnRydXA=?= Microsoft Excel Misc 0 27th Nov 2006 08:01 PM
Easy way to cast an array of strings to an array of objects? ssg31415926 Microsoft C# .NET 3 30th Aug 2005 08:39 PM
is there way to convert array of objects to array of strings ? roni Microsoft Dot NET 6 29th Apr 2005 02:23 PM
Named range(s) of non-adjacent cells return #VALUE! error in array formulas cgreen07@hotmail.com Microsoft Excel Discussion 4 10th Jan 2005 05:11 PM


Features
 

Advertising
 

Newsgroups
 


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