Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel
AC AC is offline
external usenet poster
 
Posts: 7
Default HowTo: detect a cell contains an ArrayFormula in vba?

Hi

I would like to know how to decide/detect if a cell contains an array
formula.

I found the property .FormulaArray but it seems to return a value for
regular formalas (in fact it returns a value even if the cell contains
just a value and not even a formula)

Take the following dummy example <i made up the array formula on the
fly, may have a mistake:
A1 = "Hello World", A2 = "=sum(1 + 2)", A3 is blank but has yellow
fill, and A4 = "{sum(if(B1:B10<10,1,0))}"

i would like to be able to detect the fact A4 contains an array
formula, and that all the other cells done.

When I write the code:
msgbox Cells("Ax").formulaArray [where x is the cell number]

I get values returned for A1, A2 and A4, namely "Hello World", "=sum
(1+2)" and "=sum(if(B1:B10<10,1,0))" respectively

I only want A4 to be detected, as it has an array formula.

Maybe there is some other property i have not found?

Excel 2003 SP3 running on xp


Thanks
AndyC

please cc replies to my email if possible
  #2   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel
external usenet poster
 
Posts: 1,231
Default HowTo: detect a cell contains an ArrayFormula in vba?

Try the .HasArray property of the Range class.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
howto: saveas with file name from a cell in the current worksheet bob New Users to Excel 2 April 17th 09 03:46 PM
CountA and ArrayFormula ron Excel Worksheet Functions 4 November 15th 07 08:51 PM
howto: saveas with file name from a cell in the current worksheet bob New Users to Excel 0 April 5th 07 05:30 PM
HowTo disable cell reference update Eggle Charts and Charting in Excel 0 October 4th 06 03:15 PM
Size of arrayformula with VBA Sune Fibaek[_2_] Excel Programming 4 September 21st 05 09:16 AM


All times are GMT +1. The time now is 07:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"