# Check IF a Cell Value Starts with a Text or a Number (Formula in Excel)

- Written by Puneet

In Excel, while working with data there might be a situation when you need to check if the value in a cell starts with a particular text or if the starting part of that value is a number or not.  In this tutorial, we will learn to write a formula to text both conditions.

## IF a Cell Value Starts with a Particular Text

In the following example, you need to check if the starting three characters of the cell are equal to LXI. For this, you need to use the IF and LEFT.

You can use the below steps to write this formula:

1. First, enter the IF function in a cell.
2. After that, enter the LEFT function in the first argument of the IF, and refer to the cell A2 where you have the value, in the second argument, use 3 for the num_digit.
3. Next, use the equal sign and enter the value (using double quotation marks) that you want to test.
4. Now, in the second argument, enter “Yes”.
5. And in the third argument, enter “No”.
6. In the end, enter closing parentheses and hit enter to get the result.

As you can see below, for all the values where we have the value “LXI” at the start of the value, it returns Yes, else No.

``=IF(LEFT(A2,3)="LXI","Yes","No")``

Use the below formula if you want to count the number of cells which starts with a particular value.

``=SUMPRODUCT(--(LEFT(A2:A10,3)="LXI"))``

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