How to check if a cell starts with specific text in Excel
Formula (Excel and Google Sheets)
=LEFT(A2,LEN($E$1))=$E$1Compare the first characters with the prefix: =LEFT(A2,LEN($E$1))=$E$1 returns TRUE when A2 starts with the text in E1.
- Result on the example
- one result per row in
B2, filled down toB7 - Works in
- Every current version
- Google Sheets
- Same formula
See it work
The formula is already in B2, filled down to B7. Change any input and the result updates, or edit the formula to experiment.
How it works
LEN($E$1) is the length of the prefix, so LEFT takes exactly that many characters from the start of the SKU. If they equal the prefix, the SKU starts with it. "ELE-FUR-12" contains "FUR-" but doesn't start with it, so it's FALSE. The = comparison ignores case, so "fur-0450" counts.
=LEFT(A2,LEN($E$1))=$E$1In Google Sheets
The same formula works in Google Sheets: =LEFT(A2,LEN($E$1))=$E$1. We ran it in Google Sheets mode on the same data and it returns the same results.
Other ways to do it
Each one was run on the same example sheet.
| Formula | Result | When to use it |
|---|---|---|
| =COUNTIF(A2,$E$1&"*")>0 | TRUE, FALSE, TRUE… | A wildcard version: "FUR-*" means "FUR- followed by anything". Handy because the same pattern works in COUNTIF over a whole range. |
| =EXACT(LEFT(A2,LEN($E$1)),$E$1) | TRUE, FALSE, TRUE…Different result | Case-sensitive. "fur-0450" is FALSE. |
Common mistakes
- Hard-coding
LEFT(A2,4)breaks when the prefix changes length. Use LEN of the prefix cell. - A leading space in the data makes the comparison fail. TRIM imported values first.
A2="FUR-*"doesn't work: = doesn't understand wildcards. Compare with LEFT as here, or use COUNTIF, which does.
Try it yourself
Same data, empty answer cell. Your formula is graded instantly, then re-checked on changed data, so a typed-in number won't pass.
Check if a cell starts with specific text
B2, return TRUE when the SKU starts with the text in E1 and FALSE otherwise. Fill down to B7.Questions
How do I count the cells that start with the text?
Use =COUNTIF(A2:A7,$E$1&"*").
How do I list only the matching rows?
Filter them: =FILTER(A2:A7,LEFT(A2:A7,LEN($E$1))=$E$1).
How do I show Yes or a blank instead of TRUE or FALSE?
Wrap the test in IF: =IF(LEFT(A2,LEN($E$1))=$E$1,"Yes","").
Checked by running on 2026-10-30: every formula and result on this page was calculated by the Spreadsheet Practice formula engine, in both Excel and Google Sheets modes.