Excel Formulas: IF Function with Wildcard Characters!!
Tags: excelformula, excelformulas
Published: 2021-02-25 11:32:31

---
title: Excel Formulas: IF Function with Wildcard Characters!!
published: true
date: 2021-02-25 11:31:27 UTC
tags: ExcelFormula,Excelformulas
canonical_url: https://geekexcel.com/excel-formulas-if-function-with-wildcard-characters/
---

 **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](https://www.microsoft.com/en-in/microsoft-365/excel)

[![IF with Wildcard](https://geekexcel.com/wp-content/uploads/2021/02/IF-with-Wildcards.png)](https://geekexcel.com/excel-formulas-if-function-with-wildcard-characters/if-with-wildcards/#main)<figcaption id="caption-attachment-22153">IF with Wildcard</figcaption>
## 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](https://geekexcel.com/use-if-function-in-microsoft-excel-365-simple-steps/)([COUNTIF](https://geekexcel.com/formulas-to-count-with-countif-function-in-excel-office-365/)(A1,”??-????-???”),”True Result”,”False Result”)**

## Syntax Explanations:

- **IF** – In Excel, the **[IF function](https://geekexcel.com/use-if-function-in-microsoft-excel-365-simple-steps/)** helps to return one value for a **[TRUE](https://geekexcel.com/use-true-function-in-microsoft-excel-365-simple-methods/)** result, and another for a **[FALSE](https://geekexcel.com/use-false-function-in-microsoft-excel-365-simple-methods/)** result.
- **COUNTIF** – The **[COUNTIF function](https://geekexcel.com/formulas-to-count-with-countif-function-in-excel-office-365/)** 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**.

![Input Range](https://geekexcel.com/wp-content/uploads/2021/02/Input-Range-4.png)<figcaption id="caption-attachment-22154">Input Range</figcaption>

- Here we need to test the data based on some credentials.
- So, apply the above-given formula to the **[formula bar](https://geekexcel.com/how-to-use-formula-bar-for-various-purpose-in-excel-365/)** section, and press the **“Enter”** key.

![Enter the formula](https://geekexcel.com/wp-content/uploads/2021/02/Enter-the-formula-27.png)<figcaption id="caption-attachment-22155">Enter the formula</figcaption>

- Finally, it will display the results as per the below image.

![Result](https://geekexcel.com/wp-content/uploads/2021/02/Result-30.png)<figcaption id="caption-attachment-22156">Result</figcaption>

## 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](https://geekexcel.com/) **and [**Excel Formulas**](https://geekexcel.com/excel-formula/) **!!**

### Related Articles:

- **[Excel Formulas to Create a Two-way summary Count with COUNTIFS!!](https://geekexcel.com/excel-formulas-to-create-a-two-way-summary-count-with-countifs/)**
- **[Excel Formulas to Find the First Matching Values in Range with Wildcard!!](https://geekexcel.com/excel-formulas-find-first-matching-values-with-wildcard/)**
- **[Formulas for Counting Cells that Begin with Some Value in Excel!!](https://geekexcel.com/formulas-for-counting-cells-that-begin-with-some-value-in-excel/)**