In this article, we will learn about how to use Wildcards with IF function in Excel.
IF function is logic test excel function. IF function tests a statement and returns values based on the result.
We will be using the below wildcards in logic test
There are three wildcard characters in Excel
Not all functions can execute Wildcards with Excel functions.
Here is a list of functions that accepts wildcards.
Let’s understand this function using it an example.
Here we have company codes on one side. And we need to find the fields where phrase AT is present anywhere in the code.
IF function doesn’t support wildcards so we will be using the SEARCH function. SEARCH function returns a number if the phrase is present within the text.
Use the formula:
SEARCH function accepts the wildcard (*) and finds the phrase “AT”, within A2. It returns a number if SEARCH finds the phrase.
ISNUMBER function finds the number and returns TRUE.
IF function logic_test results in TRUE and FALSE and returns “AT” if True or “”(empty string) if False.
As you can see the formula catches the AT in A2 cell and returns the phrase. This shows A2 cell has “AT” pharse within text.
Now use the formula in other cells to get all fields containing the phrase “AT”.
As you can see we used wildcards with IF function to get the result.
Hope you understood how to use in Excel. Explore more articles on Excel cell reference function here. Please feel free to state your query or feedback for the above article.
The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.