Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If statem to search for special charecter 3

Status
Not open for further replies.

Starlitnight

Technical User
May 2, 2006
20
US
Hi,
I would like to know how to create a formula that would search for an asterisk *.
If I write:
=IF(ISNUMBER(SEARCH(""*"",A1)),"<myfield>","")
Excel treats the * as a special charecter
is there any way around this?
Thanks
 
=IF(ISNUMBER(SEARCH(""~*"",A1)),"<myfield>","")

add the ~ in front.

[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
Only need one set of quotes though:

=IF(ISNUMBER(SEARCH("~*",A1)),"<myfield>","")

If you use the function builder, it explains at the bottom. It also works for ?'s

[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
You also use the tilde ( ~ ) when using the Find/Replace command with characters that you don't want to be taken as wildcards.

Cheers, Glenn.

Did you hear about the literalist show-jumper? He broke his nose jumping against the clock.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top