View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Determining whether selected cell has value or formula?

John,

Use the HasFormula property. E.g.,

If Range("A1").HasFormula = True Then
' cell has formula
Else
' cell doesn't have formula
End If


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"John Wirt" wrote in message
...
I have a simple question. in VBA, how can one determine whether

the
currently selected cell has a value or a formla in it?

John Wirt