Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Search Function | Excel Discussion (Misc queries) | |||
Search function | Excel Discussion (Misc queries) | |||
Search function | Excel Worksheet Functions | |||
Search function | Excel Discussion (Misc queries) | |||
search function | Excel Programming |