Search code examples
excelvba

Range.HasArray doesn't return true even when function is entered as Array


I have an array entered into Excel Range. But when I individually check each cell inside range using Range.HasArray property, it returns False. What is correct way to determine if my target cell is part of an array or not?

I tried Range.FormulaArray but this field is populated even when the cell is not part of an array.


Solution

  • HasArray works for array formulas (entered with Ctrl+Shift+Enter) but not for "auto-spill" formulas.

    If you want to know if a range is part of a spill you need Range.HasSpill