Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default SEARCH function

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default SEARCH function

I just remembered, you can still use SEARCH if you want... the tilde (~)
character can be used to take away the wildcard meaning of a wildcard
character. So...

=SEARCH("~*",A1)

--
Rick (MVP - Excel)


"Rick Rothstein" wrote in message
...
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



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
Search Function TerryR Excel Discussion (Misc queries) 3 February 17th 09 09:32 AM
Search function Lynda Excel Discussion (Misc queries) 0 September 2nd 08 12:21 PM
Search function Calvinnie Excel Worksheet Functions 1 June 27th 08 01:31 AM
Search function se01rw Excel Discussion (Misc queries) 1 February 13th 06 02:06 PM
search function sixfivebeastman[_4_] Excel Programming 0 August 4th 04 03:57 PM


All times are GMT +1. The time now is 05:21 PM.

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"