Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Is there any way to enumerate the cell which contain a formula?

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.


  #2   Report Post  
Posted to microsoft.public.excel.programming
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.




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
Compare multiple dates, can enumerate cell based on most recent date Brian Excel Worksheet Functions 7 May 9th 06 11:02 PM
enumerate sheet Philippe L. Balmanno Excel Worksheet Functions 4 January 4th 06 12:41 AM
how to enumerate? tendercare New Users to Excel 3 August 1st 05 06:15 PM
Macro to enumerate subdirs and files in a directory! bookworm98[_9_] Excel Programming 3 January 27th 04 07:48 AM
Question: Cell formula or macro to write result of one cell to another cell Frederik Romanov Excel Programming 1 July 8th 03 03:03 PM


All times are GMT +1. The time now is 01:40 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"