ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Code to determine if a cell contains an array function? (https://www.excelbanter.com/excel-discussion-misc-queries/42911-code-determine-if-cell-contains-array-function.html)

[email protected]

Code to determine if a cell contains an array function?
 
I am looking for ways to reduce filesize and overhead in a large
spreadsheet, and as part of that I'm looking for alternatives to array
functions. I wrote this code thinking I could determine when an array
function occurs:

Dim rCell As Range
For Each rCell In ActiveSheet.UsedRange
If rCell.FormulaArray = True Then
MsgBox rCell.Address
End If
Next rCell

.... but this seems to find a cell that is part of an array. Can anyone
suggest some better code to determine if a cell contains an array
function?

Thanks


Dave O

Try
If rcell.HasArray = true then

.... instead.



All times are GMT +1. The time now is 07:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com