Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • How to sum a total in multiple Excel tables
  • How to Create Gantt Chart in Excel
  • Conditional Formatting New Rule with Formulas in Excel
  • How To Sort One Column or Multiple Columns in Excel
  • Calculate Conditional Percentile ‘IF’ in table in Excel

References

  • How to get relative row numbers in a range in Excel
  • To count total rows in a range in Excel
  • VLOOKUP function: Description, Usage, Syntax, Examples and Explanation
  • Count unique text values with criteria
  • LOOKUP function: Description, Usage, Syntax, Examples and Explanation

Data Validations

  • Excel Data validation specific characters only
  • Excel Data validation allow uppercase only
  • Excel Data validation date in specific year
  • Prevent invalid data entering in specific cells
  • Excel Data validation number multiple 100

If cell begins with x, y, or z in Excel

by

This tutorial shows how to calculate If cell begins with x, y, or z in Excel using the example below;

Formula

=SUM(COUNTIF(A1,{"x*","y*","z*"}))>0

Explanation

To test values to see if they begin with one of several characters (i.e. begin with x, y, or z) , you can use the COUNTIF function together with the SUM function.

In the example shown, the formula in C5 is:

=SUM(COUNTIF(B5,{"x*","y*","z*"}))>0

How this formula works

The core of this formula is COUNTIF, which is configured to count three separate values using wildcards:

COUNTIF(B5,{"x*","y*","z*"}

The asterisk (*) is a wildcard for one or more characters, so it is used to create a “begins with” test.

The values in the criteria are supplied in an “array constant”, a hard-coded list of items  with curly braces on either side.

When COUNTIF receives the criteria in an array constant, it will return multiple values, one per item in the list. Because we are only giving COUNTIF a one-cell range, it will only return two possible values for each criteria: 1 or 0.

In cell C5, COUNTIF evaluates to {0,0,0}. In cell C9, COUNTIF evaluates to: {0,1,0}. In each case, the first item is the result of  criteria “x*”, the second is from criteria “y*”, and the third result is from criteria “z*”.

Because we are testing for 3 criteria with OR logic, we only care if any result is not zero. To check this, we add up all items using the SUM function, and, to force a TRUE/FALSE result, we add “>0” to evaluate the result of SUM. In cell C5, we have:

=SUM({0,0,0})>0

Which evaluates to FALSE.

More criteria

The example shows 3 criteria (begins with x, y, or z) , but you add more criteria as needed.

Conditional formatting

Since this formula returns TRUE / FALSE, you can use it as-is to highlight values using conditional formatting.

Post navigation

Previous Post:

COSH function: Description, Usage, Syntax, Examples and Explanation

Next Post:

Excel Data validation require unique number

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • Complete List of Excel Logical Functions, References and Examples
  • Check multiple cells are equal in Excel
  • How to use Excel XOR Function
  • XOR function: Description, Usage, Syntax, Examples and Explanation
  • IFERROR function: Description, Usage, Syntax, Examples and Explanation

Date Time

  • Convert Unix time stamp to Excel date
  • Get last weekday in month in Excel
  • How to calculate percent of year complete in Excel
  • Get week number from date in Excel
  • MINUTE function: Description, Usage, Syntax, Examples and Explanation

Grouping

  • Group numbers at uneven intervals in Excel
  • Map inputs to arbitrary values in Excel
  • Group numbers with VLOOKUP in Excel
  • Group arbitrary text values in Excel
  • How to randomly assign people to groups in Excel

General

  • How to Insert Cells, Row and Rows in Excel
  • How to calculate percent change in Excel
  • Flash Fill in Excel
  • How to calculate decrease by percentage in Excel
  • How to get random value from list or table in Excel
© 2026 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning