FormulaCraft

How to check if text starts with a value in Excel and Google Sheets

Excel & Google Sheets
=LEFT(A2,5)="Order"

Verified example

Computed by a real spreadsheet engine on the sample data below.

TextStarts with Order?
Order 1001
Invoice 2002
Order 1002
Return 500
Order 1003

=LEFT(A2,5)="Order"TRUE

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1Enter =LEFT(A2,5)="Order" — this returns TRUE if the first 5 characters equal "Order".
  2. 2Adjust the length argument (5) to match the number of characters in your prefix.
  3. 3Wrap in IF for a custom label: =IF(LEFT(A2,5)="Order","Sales","Other").
  4. 4For case-insensitive comparison, wrap both sides in LOWER: =LOWER(LEFT(A2,5))="order".

Tips

Working on a sheet you inherited? Run the Auditor on the whole file first — it flags every #REF!, #N/A, broken column pattern, and inconsistent formula in seconds, free, no signup.

Frequently asked

Is there a dedicated STARTSWITH function?

Neither Excel nor Google Sheets has a built-in STARTSWITH, but the LEFT or COUNTIF wildcard approaches shown above are equally effective.

Can I check for multiple possible prefixes at once?

Use OR: =OR(LEFT(A2,3)="INV",LEFT(A2,3)="ORD") — or use SUMPRODUCT with an array of prefixes for a more compact formula.

Formulas used

Related tasks

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: