79388

How to check if cell contains wildcard asterisk (*) character

Question:

<strong>Consider the following two formulas:</strong>

=IF(SEARCH("*", A1), "true", "false") =IF(SEARCH(CHAR(42), A1), "true", "false")

I am using this to try and detect if a cell contains a <strong>*</strong> character, but this returns "true" for all cells. I can only assume that Excel sees <strong>*</strong> as a wildcard maybe.

How do you detect the existence of a <strong>*</strong> in Excel?

Answer1:

According to this reference of <a href="http://support.microsoft.com/kb/214138" rel="nofollow">microsoft</a> you should be able to use ~

<blockquote>

Microsoft Excel uses the tilde (~) as a marker to indicate that the next character is a literal. When you use the Find and Replace dialog box to find or replace a character such as a tilde (~), an asterisk (*), or a question mark (?), you must add a tilde (~) before the character in the Find what box.

</blockquote>

So change =IF(SEARCH("*", A1), "true", "false") to =IF(SEARCH("~*", A1), "true", "false") and it should work.

Recommend

  • Show keyboard programatically using React native
  • Can't use method findOne() in Spring boot
  • How to search for the nth occurence of a pattern in Emacs?
  • Two divs one besides the other without wrapping
  • Function call in where clause
  • placeholder works for text but not password box in IE/Firefox using this javascript
  • jQuery validate plugin : adding a custom validator to accept letters only?
  • Automate stdin with Python using stdin.write()
  • setOnclickListner is initialized twice?
  • QuickLook class not working
  • Issue with terraform lookup
  • How to get strings in parentheses into array with java
  • What is the difference between 'import' and 'require' in JavaScript?
  • how to display same image multiple times using same image in javascript
  • twitter bootstrap for high resolution mobile displays
  • Rails Active storage Unable to autoload constant ActiveStorage::Blob::Analyzable
  • CSS button not styling
  • org.springframework.security.oauth2.common.exceptions.InvalidGrantException: Bad credentials
  • Python: Graph using NetworkX and mplleaflet
  • Html Multiple Input Elements With Same Name
  • Was default_marker removed from mapbox-gl.js
  • Master makefile which runs make files in subdirectories
  • Java: How to refer to subclass's static variable in abstract class?
  • Moving Circle on Live Wallpaper
  • How to change WebBrowser fullscreen video mode?
  • Migrating MOSS 2007 from SQL 2000 to SQL 2005 [closed]
  • Difference between assigning instantiation to parent class and derived class
  • Find string between two substrings AND between string and the end of file
  • Redmine can't generate secret token
  • Get an image from the video
  • Hibernate Idempotent Update
  • Azure NodeJS Error: ENOENT, open 'D:\\home\\site\\wwwroot\\bin\\views\\'
  • date changes on export kendoGrid
  • JQuery Mobile Ajax Navigation in Single-Page Template
  • Slice assignment to tensorflow variable
  • Java Collections.shuffle() weird behaviour [closed]
  • Delphi Prism getting Unknown Identifier “DllImport” error
  • Year over Year Stats from a Crossfilter Dataset
  • Neo4j…how to get a visual representation of my data?
  • Firebase: How to read from external DB?