Thread: SEARCH function
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default SEARCH function

The SEARCH function allows for wildcards and the asterisk is a wildcard
(meaning zero or more unspecified characters). The FIND function does not
allow for wildcards, so I would use that instead. Note, though, that FIND is
a case-sensitive search engine and SEARCH is case insensitive, so you need
to keep that in mind.

--
Rick (MVP - Excel)


"lk" wrote in message
...
Hi

Hope this is the right place to post this - this is a formula question as
opposed to VBA but here goes.

I have a column which contains a mixture of numbers, text values and in
some cases a combination between the two for example
0
1
2
3
95*
DNB

I need an if statement to proceed determined by the contents. However if
I do

=SEARCH("*",A1) (or indeed any cell) I'm getting a 1. =SEARCH("d",A1)
gives me correct results either an error or the index of the character.
It seems something peculiar to the "*" character.

I can probably work around it but am I doing something wrong here - it's
Excel 2003 on XP SP3.

Thanks