Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

test cell to see that is does not use a certain function

Status
Not open for further replies.

dgillz

Instructor
Mar 2, 2001
10,045
US
In VBA, how can I test a cell's formula to see if it does or does not contain a certain function?

Software Sales, Training, Implementation and Support for Macola, Synergy, and Crystal Reports. Check out our Macola tools:
 




Hi,

Check the Formula property.

Skip,
[glasses]Don't let the Diatribe...
talk you to death![tongue]

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
You could just use InStr to see if the function is in the formula:
Code:
    If InStr(Range("A1").Formula, "SUM") Then
        MsgBox "YES"
    End If

[tt][blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ 181-2886 before posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top