Excel Dynamic Array calculation engine bug

%3CLINGO-SUB%20id%3D%22lingo-sub-1609502%22%20slang%3D%22en-US%22%3EExcel%20Dynamic%20Array%20calculation%20engine%20bug%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1609502%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20recently%20discovered%20a%20bug%20in%20the%20Excel%20Dynamic%20Array%20Calculation%20Engine.%26nbsp%3B%20If%20you%20refer%20to%20a%20formula%20that%20has%20a%20potential%20circular%20reference%20in%20it%2C%20the%20dynamic%20array%20will%20create%20a%20circular%20reference%20when%20the%20dynamic%20array%20formula%20is%20referred%20to%20by%20yet%20another%20cell%20that%20potentially%20can%20be%20involved%20in%20the%20potential%20circ%2C%20regardless%20of%20whether%20there%20is%20an%20acutal%20circular%20reference%20in%20the%20current%20spreadsheet's%20state.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20example%2C%20if%20you%20have%20a%20formula%20that%20calculates%20average%20interest%20based%20on%20the%20beginning%20and%20ending%20balance%20of%20a%20piece%20of%20debt%20that%20depends%20on%20how%20much%20cash%20you%20have%20to%20pay%20off%20that%20debt%20and%20for%20the%20formula%20you%20use%20the%20following%20pseudo%20code%3A%20%3DIF(ALLOW_CIRCS%3D1%2C%20(do%20average%20interest%20calculation%20e.g.%20the%20circular%20reference%20calculation)%2C%20(do%20beginning%20balance%20interest%20calculation%20-%20the%20non-circular%20calculaton))%20and%20you%20refer%20to%20a%20cell%20with%20such%20a%20formula%20with%20a%20Dynamic%20Array%20(for%20example%20to%20determine%20how%20much%20cash%20you%20generate)%2C%20then%20you%20refer%20to%20this%20Dynamic%20array%20by%20a%20cell%20that%20can%20be%20involved%20in%20any%20way%20to%20the%20potential%20circular%20reference%20(for%20example%2C%20this%20year's%20ending%20cash%20balance%20would%20have%20to%20connect%20to%20the%20change%20in%20cash).%26nbsp%3B%20You%20will%20get%20a%20circular%20reference%20on%20the%20spreadsheet%20even%20if%20ALLOW_CIRCS%3D0.%26nbsp%3B%20I%20can%20create%20a%20small%20spreadsheet%20to%20illustrate%20this%20if%20anyone%20is%20interested.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20is%20kind%20of%20hard%20to%20explain%20%3A).%26nbsp%3B%20I%20screwed%20it%20up%20the%20first%20few%20times%20I%20contacted%20support.%26nbsp%3B%20But%20I%20am%20almost%20positive%20this%20is%20a%20bug.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1609585%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Dynamic%20Array%20calculation%20engine%20bug%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1609585%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F769749%22%20target%3D%22_blank%22%3E%40david_200122235%3C%2FA%3E%26nbsp%3BI%20have%20attached%20two%20files%20showing%20the%20error.%26nbsp%3B%20The%20one%20with%20dynamic%20arrays%20shows%20a%20circ%20and%20the%20other%20one%20using%20%22normal%22%20formulas%20does%20not.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

Hi,

I recently discovered a bug in the Excel Dynamic Array Calculation Engine.  If you refer to a formula that has a potential circular reference in it, the dynamic array will create a circular reference when the dynamic array formula is referred to by yet another cell that potentially can be involved in the potential circ, regardless of whether there is an acutal circular reference in the current spreadsheet's state.

 

For example, if you have a formula that calculates average interest based on the beginning and ending balance of a piece of debt that depends on how much cash you have to pay off that debt and for the formula you use the following pseudo code: =IF(ALLOW_CIRCS=1, (do average interest calculation e.g. the circular reference calculation), (do beginning balance interest calculation - the non-circular calculaton)) and you refer to a cell with such a formula with a Dynamic Array (for example to determine how much cash you generate), then you refer to this Dynamic array by a cell that can be involved in any way to the potential circular reference (for example, this year's ending cash balance would have to connect to the change in cash).  You will get a circular reference on the spreadsheet even if ALLOW_CIRCS=0.  I can create a small spreadsheet to illustrate this if anyone is interested.

 

It is kind of hard to explain :).  I screwed it up the first few times I contacted support.  But I am almost positive this is a bug.

1 Reply

@david_200122235 I have attached two files showing the error.  The one with dynamic arrays shows a circ and the other one using "normal" formulas does not.