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 Is there any way to enumerate the cell which contain a formula?

Aaron,

You can use the SpecialCells property to get a range of cells
with formulas. For example,

Dim FRng As Range
Dim R As Range
On Error Resume Next
Set FRng = ActiveSheet.UsedRange.SpecialCells(xlCellTypeFormu las)
On Error GoTo 0
If Not FRng Is Nothing Then
For Each R In FRng
Debug.Print R.Address, R.Formula
Next R
Else
Debug.Print "No cells with formulas."
End If



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

"Aaron Queenan" wrote
in message ...
I want to search all of the cells which contain a formula, and

preferably
not bother with the empty cells. Is there any way to get that

information
from the Excel 2000 object model?

Thanks,
Aaron Queenan.