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

Data Analysis

  • How to conditionally sum numeric data in an Excel table using SUMIFS
  • How to Create One and Two Variable Data Tables in Excel
  • Calculate Conditional Percentile ‘IF’ in table in Excel
  • How to create a Histogram in Excel
  • Create Scatter Chart in Excel

References

  • How to use Excel TRANSPOSE Function
  • Count rows with at least n matching values
  • Last row number in range
  • Get nth match with INDEX / MATCH in Excel
  • How to get last row in mixed data with blanks in Excel

Data Validations

  • Excel Data validation require unique number
  • Excel Data validation no punctuation
  • Excel Data validation with conditional list
  • Excel Data validation must begin with
  • Excel Data validation allow uppercase only

How to check cell contains which things in Excel

by

If you have a list of things (words, substrings, etc) and want to find out which of these things appear in a cell, you can build a simple table and use a formula based on the SEARCH function.

Setup

Suppose you have a cells that contain text that mentions various colors, and you want to figure out which colors are mentioned in each cell.

With the text on the left, create a simple table with the cells you want to check on the left, and the words you want to look for as column labels to the right.

See example below:

Formula

=IF(ISNUMBER(SEARCH(substring,text)),substring,"")

Note that the references in this formula are carefully constructed. The reference to C$4 has the row locked, and the reference to $B5 has the column locked. This allows the formula to be copied throughout the table and still work correctly.

Explanation

In the example, we are checking for 6 colors, so the table has 7 columns total including the column we are searching within.

In the second column, add the first formula. In cell C5 of the example, we have:

=IF(ISNUMBER(SEARCH(C$4,$B5)),C$4,"")

How this formula works

This formula is based on the simpler formula described here. It uses the SEARCH function to look inside B5 for using cell C4 as the search string. If SEARCH returns a number, it means the search string was found. In that case, ISNUMBER will return TRUE, and the IF function will return the value in C4.

If the search string isn’t found, SEARCH returns an error, ISNUMBER returns FALSE, and the IF function returns an empty string (“”) — the value if FALSE.

 

Post navigation

Previous Post:

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

Next Post:

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

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

  • Extract multiple matches into separate rows in Excel
  • NOT function: Description, Usage, Syntax, Examples and Explanation
  • Excel If, Nested If, And/Or Criteria Examples
  • Not Equal To ‘<>‘ operator in Excel
  • FALSE function: Description, Usage, Syntax, Examples and Explanation

Date Time

  • Series of dates by day
  • Assign points based on late time in Excel
  • ISOWEEKNUM function: Description, Usage, Syntax, Examples and Explanation
  • Get age from birthday in Excel
  • Calculate series of dates by workdays in Excel

Grouping

  • Running count group by n size in Excel
  • How to randomly assign data to groups in Excel
  • Calculate conditional mode with criteria in Excel
  • Map text to numbers in Excel
  • Categorize text with keywords in Excel

General

  • How to get original price from percentage discount in Excel
  • AutoFit Column Width, AutoFit Row Height in Excel
  • Common Errors in Excel
  • How to choose page/paper size in Excel before Printing
  • Select, Insert, Rename, Move, Delete Worksheets in Excel
© 2026 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning