• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to recognise a formula is Normal Formula or Array Formula

Debraj

Excel Ninja
Hi Team,

Is this possible to select
* Special Cell > Formula > Contain ArrayFormula.

I mean something like..
if left(.formula) = "{" then IsArrayFormula = True

For example, If A4 = "=SUM(A1:A2)"
and A5 = "{=SUM(A1:A2)}"

then I want to select A5 only..
 
Deb,

On a new hunt? See if below works for you

Code:
Public Sub SelectArrayFormulaCells()
Dim r As Range, rUnion As Range

For Each r In ActiveSheet.UsedRange
  If r.HasArray Then
  If rUnion Is Nothing Then
  Set rUnion = r
  Else
  Set rUnion = Union(rUnion, r)
  End If
  End If
Next r

If Not rUnion Is Nothing Then rUnion.Select
End Sub
 
Hi Shri..

Yes.. HasArray is the property I am searching for..
Thanks..

actually working on a module.. where I need to show msg.. if user has entered the formula as Normal, where CSE required.. Thanks a lot man..
 
Back
Top