+ Reply to Thread
Results 1 to 3 of 3

Unable to set the FormulaArray property of the Range class

  1. #1
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Unable to set the FormulaArray property of the Range class

    Hi

    I am trying to change an array formula via code, using the following code, basically adding *(Assumed FTE)* after the Contractor=Yes criteria.

    Please Login or Register  to view this content.
    This gives a formula like

    =SUM((tblEmployees[Type]='Resource Planner Data'!$A7)*(tblEmployees[Contractor]="Yes")*(tblEmployees[Assumed FTE])*(tblEmployees[Start]<'Resource Planner Data'!F$2)*((tblEmployees[End]>'Resource Planner Data'!F$3)+(tblEmployees[End]="")))*$C$4

    But the error of

    Unable to set the FormulaArray property of the Range class on this line

    c.FormulaArray = strNewFormula

    Many thanks

    Nathan,

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Unable to set the FormulaArray property of the Range class

    if I cut and paste the string into the cell CSE it, it works fine.

  3. #3
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Unable to set the FormulaArray property of the Range class

    You cannot change a multi-cell array formula one cell at a time. You would Clear\Change all the cells in the multi-cell array all at once.

    Try something like this (not tested). Assumes you have only one Multi-Cell "Contractor" array.

    Please Login or Register  to view this content.
    Perhaps a Named Range would be better than looping through the cells to determine the multi-cell array range.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1