View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
[email protected] paul.robinson@it-tallaght.ie is offline
external usenet poster
 
Posts: 789
Default Return Exact Value

Hi
Presumably you have used InStr because the values you are looking for
combine text and numbers, otherwise you would simply test
"If .Value = 7 then"
Hard to say what to do without seeing what your values look like. you
could try the Val function

e.g Val("Record7") = 7
Val("Record27") = 27
Val("7bRecord") = 7
Val("first7Record") = 7
Val("Record7and3") = 7

The Val kicks in when it meets a numerical character and stops when it
meets a nonnumeric character. The period . is a decimal separator so is
counted.

regards
Paul