Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / September 2007

Tip: Looking for answers? Try searching our database.

Conditional formatting based on what function is used in a cell.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
hugehead - 14 Sep 2007 05:28 GMT
Is there a way to use conditional formatting in such a way so I can highlight
cells that use a particular formula?
For example, my spreadsheet uses a lot of INDIRECT() formulas in different
variations, but I would like to highlight them all.
Thanks in advance.
Bob Phillips - 14 Sep 2007 09:26 GMT
VBA would do it

Public Sub Test()
Dim cell As Range
   For Each cell In ActiveSheet.UsedRange
       If cell.HasFormula Then
           If InStr(cell.Formula, "INDIRECT") > 0 Then
               cell.Interior.ColorIndex = 38
           End If
       End If
   Next cell
End Sub

Signature

HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

> Is there a way to use conditional formatting in such a way so I can
> highlight
> cells that use a particular formula?
> For example, my spreadsheet uses a lot of INDIRECT() formulas in different
> variations, but I would like to highlight them all.
> Thanks in advance.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.