View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Refine search criteria for Find Method

You can use wild cards in Edit|Find (or the VBA equivalent).

But what would you search for???

=n()
=if(n(...
=if(a1=b1,n(...
=a1+n(...
=a1-n(...
=a1*n(...
=a1^n(...
=a1/n(...

So you could look for = ( + - * / ^ ,

I'm sure you can think of more!

And make sure you exclude strings.

=if(a1=b1,"Please do this by then(before tuesday)","")

It ain't easy writing the parser you want.

Good luck.

ExcelMonkey wrote:

I am using the Find method to search for the N() function in a cell. It
works fine, except it also picks up any other function that ends with an N
such as:Median, Mean, etc. The same thing happens with I search for the T()
function as well. It picks up SUMPRODUCT, OFFSET etc.

How can I revised the search terms in the Find Method to ensure that I only
get N()? Can I employ wildcards in the search term?

VolFormType = "N"
SpecFormula = VolFormType & "("
With rng
Set C = .Find(SpecFormula, LookIn:=xlFormulas)
If Not C Is Nothing Then
HasSpecificFormula = True
End If
End With


--

Dave Peterson