Wildcards are special characters that can be used to take the place of characters in a formula. In Excel, there are three are only three wildcard characters available. They are Asterisk (*), Question Mark (?), and Tilde (~). In this article, we are going to see how to test the values with wildcard characters in Excel by using the IF Function. Let’s step into this article!! Get an official version of ** MS Excel** from the following link: https://www.microsoft.com/en-in/microsoft-365/excel
General Formula:
- Basically, the IF function doesn’t support the wildcards, but you can combine the IF function with COUNTIF or COUNTIFS function to achieve this method.
- Use the below formula to test the cell that contains wildcard characters.
=IF(COUNTIF(A1,”??-????-???”),”True Result”,”False Result”)
Syntax Explanations:
- IF – In Excel, the IF function helps to return one value for a TRUE result, and another for a FALSE result.
- COUNTIF – The COUNTIF function will help to count the number of cells that meet a single condition or criteria.
-
Wildcard Characters :
- Asterisk (*) – It represents any number of characters.
- Question Mark (?) – It represents one single character.
- Tilde (~) – It is used to identify a wildcard character.
- Comma symbol (,) – It is a separator that helps to separate a list of values.
- Parenthesis () – The main purpose of this symbol is to group the elements.
Practical Example:
Let’s consider the below example.
- First, we will enter the input data in Column B.
- Here we need to test the data based on some credentials.
- So, apply the above-given formula to the formula bar section, and press the “Enter” key.
- Finally, it will display the results as per the below image.
Bottom-Line:
In this tutorial, we have described the simple steps to test the cells that contain wildcard characters in Excel by using the IF function. Hope you like it. If you have any doubts, don’t forget to share them with us. I reply to queries frequently. Thank you so much for visiting our site!! To learn more, check out Geek Excel *and Excel Formulas *!!
Top comments (0)