Getting Excel add ins to modify array formula parameters; or perform 'ctrl-shift-enter'
        Posted  
        
            by Toby Wilson
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Toby Wilson
        
        
        
        Published on 2010-06-14T09:10:12Z
        Indexed on 
            2010/06/14
            9:12 UTC
        
        
        Read the original article
        Hit count: 318
        
I am trying to make a C# Excel add in change the parameters of an array formula in-place; i.e. do the same as a user modifying an array formula and hitting ctrl-shift-enter.
Setting the activeCell.FormulaArray property does not achieve this; it throws a 'You cannot change part of an array' error.
Does anyone know how I can achieve this?
A solution that also works in VBA would be brilliant.
I've tried creating some logic that 'walks' to the perimeter of the array formula and deletes it first, but it doesn't account for adjacent array formulas and I believe this is unnecessarily drastic.
© Stack Overflow or respective owner