Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to refine this Macro | Excel Discussion (Misc queries) | |||
Search & Refine Raw Data | Excel Discussion (Misc queries) | |||
How do I search excel spreadsheets using multiple search criteria. | Excel Worksheet Functions | |||
multiple search criteria to find and copy from sheet1 and paste into sheet2 | Excel Programming | |||
Find Method ; search area | Excel Programming |