This article brings you relevant knowledge about excel, which mainly organizes the related issues of extracting data by keywords. Let’s take a look at it together. I hope it will be helpful to everyone.
Related learning recommendations: excel tutorial
Today we share a common data extraction problem-extracting data by keywords.
As shown in the figure below, it is a partial menu of an internal canteen of an organization. We need to use the keyword in cell E2 to extract all records that contain the keyword in the dish name.
Method 1 Function formula
G2 Enter the following array formula, hold down the Shift and Ctrl keys, and press Enter. Then copy the formula to the right and down.
=IFERROR(INDEX(A:A,SMALL(IF(ISNUMBER(FIND($E$2,$A$2:$A$85))),ROW($2:$85)),ROW(A1)) ),””)
The extraction results are as follows:
The formula roughly means, use the FIND function to query the keyword in the data area, if the key is included If the word is used, the number representing the position is returned, otherwise an error value is returned.
Then use the ISNUMBER function to determine whether the result of the FIND function is a numerical value, which is equivalent to determining whether it contains keywords.
Next use the IF function to return the corresponding line number if the keyword is included.
Then use the SMALL function to extract the row numbers containing the keywords from small to large, and use the INDEX function to return the content of the corresponding position in column A.
Is it complicated? Are you confused? Ha ha ha ha.
Method 2 Using Office 365
If you are using Office 365, the formula will be much simpler:
Enter the following formula in cell G2, press Just press Enter.
=FILTER(A2:B85,ISNUMBER(FIND(E2,A2:A85)))
The FILTER function is unique to the 365 version. The function is to filter records according to conditions. The first parameter is the data area to be processed, and the second parameter is the specified filtering condition. For the filtering condition here, we still use the form of ISNUMBER FIND to determine whether it contains keywords.
The advantage of using formulas is that when the keywords change, the results can be automatically updated. However, when the first formula processes a large amount of data, Excel will freeze if you are not careful.
Related learning recommendations: excel tutorial
The above is the detailed content of Detailed explanation of extracting data by keyword in excel. For more information, please follow other related articles on the PHP Chinese website!

This tutorial explains how to calculate the median of numerical data in Excel using the MEDIAN function. The median, a key measure of central tendency, identifies the middle value in a dataset, offering a more robust representation of central tenden

Master Google Sheets COUNTIF: A Comprehensive Guide This guide explores the versatile COUNTIF function in Google Sheets, demonstrating its applications beyond simple cell counting. We'll cover various scenarios, from exact and partial matches to han

This tutorial provides a comprehensive guide to sharing Excel workbooks, covering various methods, access control, and conflict resolution. Modern Excel versions (2010, 2013, 2016, and later) simplify collaborative editing, eliminating the need to m

This tutorial explores various methods for converting .xls files to .jpg images, encompassing both built-in Windows tools and free online converters. Need to create a presentation, share spreadsheet data securely, or design a document? Converting yo

This tutorial clarifies the function of Excel names and demonstrates how to define names for cells, ranges, constants, or formulas. It also covers editing, filtering, and deleting defined names. Excel names, while incredibly useful, are often overlo

This tutorial clarifies the distinction between standard deviation and standard error of the mean, guiding you on the optimal Excel functions for standard deviation calculations. In descriptive statistics, the mean and standard deviation are intrinsi

This Excel tutorial demonstrates how to calculate square roots and nth roots. Finding the square root is a common mathematical operation, and Excel offers several methods. Methods for Calculating Square Roots in Excel: Using the SQRT Function: The

Unlock the Power of Google Sheets: A Beginner's Guide This tutorial introduces the fundamentals of Google Sheets, a powerful and versatile alternative to MS Excel. Learn how to effortlessly manage spreadsheets, leverage key features, and collaborate


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Atom editor mac version download
The most popular open source editor

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

Zend Studio 13.0.1
Powerful PHP integrated development environment