Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 553
Default Refine search criteria for Find Method

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Refine search criteria for Find Method

Try adding a leading space...
VolFormType = " N"

Jim Cone
San Francisco, USA


"ExcelMonkey" wrote in message
...
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
  #3   Report Post  
Posted to microsoft.public.excel.programming
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
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
how to refine this Macro [email protected] Excel Discussion (Misc queries) 3 June 6th 09 11:33 PM
Search & Refine Raw Data bbibib Excel Discussion (Misc queries) 8 January 6th 07 06:12 PM
How do I search excel spreadsheets using multiple search criteria. Kasper Excel Worksheet Functions 4 December 15th 05 12:26 AM
multiple search criteria to find and copy from sheet1 and paste into sheet2 lothario[_54_] Excel Programming 2 November 25th 03 09:57 AM
Find Method ; search area CG Rosén Excel Programming 1 November 22nd 03 01:29 PM


All times are GMT +1. The time now is 03:07 AM.

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"