How can I check if a cell begins with specific characters in Excel?

To check if a cell begins with specific characters in Excel, use the “LEFT” function to extract the first few characters from the cell and then compare it with the desired characters using the “IF” function. This will return a TRUE or FALSE value, indicating whether the cell starts with the specified characters or not. Another alternative is to use the “COUNTIF” function, where you can specify the criteria as “*” followed by the desired characters. This will count the number of cells that begin with those characters and if the count is greater than 0, it means the cell begins with the specified characters. These methods can be used to efficiently check for specific character patterns in cells within an Excel spreadsheet.

Excel: Check if Cell Begins With Specific Characters


You can use the following formulas in Excel to check if a cell begins with specific characters:

Formula 1: Check if Cell Begins with Specific Set of Characters

=IF(LEFT(A2,2)="AB","Yes","No")

This particular formula checks if the first two characters in cell A2 are “AB” and returns Yes or No accordingly.

Formula 2: Check if Cell Begins with One of Several Characters

=IF(OR(LEFT(A2,1)="A", LEFT(A2,1)="D"),"Yes","No")

This particular formula checks if the first character in cell A2 is either “A” or “D” and returns Yes or No accordingly.

Formula 3: Check if Cell Begins with Number

=IF(ISNUMBER(VALUE(LEFT(A2,1))), "Yes","No")

This particular formula checks if the first character in cell A2 is a number and returns Yes or No accordingly.

The following examples show how to use each formula in practice with the following list of product ID’s in Excel:

Let’s jump in!

Example 1: Check if Cell Begins with Specific Set of Characters

We can use the following formula to check if the first two characters of each cell in the Product column are equal to “A” or not:

=IF(LEFT(A2,2)="AB","Yes","No")

We can type this formula into cell B2 and then click and drag this formula down to each remaining cell in column B:

Excel check if cell begins with specific text

Column B now returns “Yes” or “No” in each row to indicate if the Product ID in the corresponding cell in column A starts with “AB” or not.

Example 2: Check if Cell Begins with One of Several Characters

We can use the following formula to check if the first character of each cell in the Product column is equal to either “A” or “D”:

=IF(OR(LEFT(A2,1)="A", LEFT(A2,1)="D"),"Yes","No")

We can type this formula into cell B2 and then click and drag this formula down to each remaining cell in column B:

Excel check if cell begins with one of several characters

Column B now returns “Yes” or “No” in each row to indicate if the Product ID in the corresponding cell in column A starts with either “A” or “D.”

Example 3: Check if Cell Begins with Number

We can use the following formula to check if the first character of each cell in the Product column is a number or not:

=IF(ISNUMBER(VALUE(LEFT(A2,1))), "Yes","No")

We can type this formula into cell B2 and then click and drag this formula down to each remaining cell in column B:

Excel check if cell begins with number

Column B now returns “Yes” or “No” in each row to indicate if the first character of the Product ID in the corresponding cell in column A is a number or not.

Additional Resources

The following tutorials explain how to perform other common tasks in Excel:

x