Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default FormulaArray problem

Hi all

I've been having trouble using code to write an array formula to a cell. I
get the msg "Unable to set the FormulaArray property of the Range class"
after the following code:

str1 = "ugly formula goes here ..... 300+ characters later"
ActiveSheet.Range("H8").FormulaArray = str1


Now, if I manually enter the array formula in cell H8, it works well.
If I use .Formula instead of .FormulaArray, it also works after I use
<ctrl<shift<enter. I suspect their may be a limit on formula size when
using .FormulaArray, but I can't find this in the excel help. (actually,
there's lots I can't find here)

Is there a way to work around this apparent limiltation in FormulaArray?

Thanks
Bri


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 91
Default FormulaArray problem

Are formulas allowed to be more than 256 charactors long??

and
Wow!... you need a formula over 300 charactors long, what's it doing

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default FormulaArray problem

Maybe this workaround from Dick Kusleika's site would work:
http://www.dailydoseofexcel.com/arch...rmulas-in-vba/

Or

http://snipurl.com/pl1q

Bri wrote:

Hi all

I've been having trouble using code to write an array formula to a cell. I
get the msg "Unable to set the FormulaArray property of the Range class"
after the following code:

str1 = "ugly formula goes here ..... 300+ characters later"
ActiveSheet.Range("H8").FormulaArray = str1

Now, if I manually enter the array formula in cell H8, it works well.
If I use .Formula instead of .FormulaArray, it also works after I use
<ctrl<shift<enter. I suspect their may be a limit on formula size when
using .FormulaArray, but I can't find this in the excel help. (actually,
there's lots I can't find here)

Is there a way to work around this apparent limiltation in FormulaArray?

Thanks
Bri


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default FormulaArray problem

Thanks Dave - works like a charm!

interesting how REPLACE can be used to work around this 255 character
limitation.
Bri

Peterson" wrote in message
...
Maybe this workaround from Dick Kusleika's site would work:
http://www.dailydoseofexcel.com/arch...rmulas-in-vba/

Or

http://snipurl.com/pl1q

Bri wrote:

Hi all

I've been having trouble using code to write an array formula to a cell.
I
get the msg "Unable to set the FormulaArray property of the Range class"
after the following code:

str1 = "ugly formula goes here ..... 300+ characters later"
ActiveSheet.Range("H8").FormulaArray = str1

Now, if I manually enter the array formula in cell H8, it works well.
If I use .Formula instead of .FormulaArray, it also works after I use
<ctrl<shift<enter. I suspect their may be a limit on formula size
when
using .FormulaArray, but I can't find this in the excel help. (actually,
there's lots I can't find here)

Is there a way to work around this apparent limiltation in FormulaArray?

Thanks
Bri


--

Dave Peterson



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using FormulaArray in VBA marcelobf Excel Programming 1 March 3rd 06 08:46 PM
Copy FormulaArray Len Excel Programming 7 April 18th 05 12:35 PM
FormulaArray Troy Excel Worksheet Functions 1 November 23rd 04 03:42 PM
FormulaArray..... HELP !!! Pierre[_6_] Excel Programming 4 May 5th 04 09:37 PM
FormulaArray UK[_2_] Excel Programming 2 February 23rd 04 05:39 PM


All times are GMT +1. The time now is 02:49 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"