Sometimes we may need to search for certain data to work with. For this purpose, we have to maintain several criteria. But when the dataset is huge, it is really hard to find what we are looking for.Â Luckily, Excel has its own functions and features to accomplish this objective. In this article, we will show you **how to extract data from Excel based on criteria** using * 6* quick and convenient methods. So, letâ€™s explore the entire article to understand the topic properly.

**Table of Contents**hide

**Download Practice Workbook**

You can download the free Excel practice workbook from here.

**6 Ways to Extract Data Based on Criteria ****from Excel**

For ease of understanding, we are going to use a * List of Students with Their Obtained Marks*. This dataset contains the

*,*

**ID***, and their corresponding*

**Name***and*

**Marks***in columns*

**Departments****B**,

**C**,

**D**, and

**E**respectively.

* Note: This is a basic dataset to keep things simple. In a practical scenario, you may encounter a much larger and more complex dataset*.

Now, weâ€™ll utilize this dataset to extract data based on criteria from Excel. So, letâ€™s explore them one by one.

Not to mention, here, we have used

*Microsoft Excel 365*version, you may use any other version according to your convenience. Please leave a comment if any part of this article does not work in your version.

**1. Implementing Array Formula to Extract Data Based on Range Criteria from Excel**

From the following dataset as an example, we will describe to you the process of extracting data based on range. Suppose, from the dataset we only want to retrieve the student details who got * Marks *from

**80**to

**100**.

The steps to extract data based on a particular range using the

**Array**formula are given below.

**Steps:**

- First, store the condition in other cells to work with those later. That means as we will be extracting studentsâ€™ details who got
**Marks**from**80**to**100**, we storedas**80**and**Start Value**the**100**asin cells**End Value****H4**and**H5**respectively. Also, we need to store the column too from where we will look for our stored values. Meaning thatand**Marks****80**are in the**100**column which is the*Marks***3**columnÂ in our dataset, so we stored^{rd }as the*3*value in cell**Column****H6**.

- Then, make an output range in cells in the
**B18:E22**range.

- Second, in another cell, where you want the result (we wanted our result in cell
**B19**), write the following formula,

`=INDEX($B$5:$E$14,SMALL(IF((INDEX($B$5:$E$14,,$H$6)<=$H$5)*(INDEX($B$5:$E$14,,$H$6)>=$H$4),MATCH(ROW($B$5:$E$14),ROW($B$5:$E$14)),""),ROWS(B19:$B$19)),COLUMNS($A$1:A1))`

**Formula Breakdown**

**INDEX($B$5:$E$14,,$H$6)****Output: {60;30;80;55;87;95;100;42;25;18}****Explanation: The INDEX Function**usually returns a single value or an entire column or row from a given cell range.**3**is stored in the**Cell $H$6**, so it returns the entire column no**3**(**Marks**column) from the whole range of the dataset (**$B$5:$E$14**) as output.

**INDEX($B$5:$E$14,,$H$6)<=$H$5**-> becomes,**{60;30;80;55;87;95;100;42;25;18}<=100****Output: {TRUE;TRUE;TRUE;TRUE;TRUE;TRUE;TRUE;TRUE;TRUE;TRUE}****Explanation:**We stored**100**in the**Cell $H$5**. As all of the values are less than**100 ($H$5)**, so it returns a column full of**TRUE**.

Similarly,

**INDEX($B$5:$E$14,,$H$6)>=$H$4**-> becomes,- {
**60;30;80;55;87;95;100;42;25;18}>=80** **Output: {FALSE;FALSE;TRUE;FALSE;TRUE;TRUE;TRUE;FALSE;FALSE;FALSE}****Explanation:**We stored**80**in the**Cell $H$4**. So it returns**TRUE**when the value from the column is**equal or greater than 80**; otherwise, it returns**FALSE**.

- {

**(INDEX($B$5:$E$14,,$H$6)<=$H$5)*(INDEX($B$5:$E$14,,$H$6)>=$H$4)**-> becomes,**{TRUE;TRUE;TRUE;TRUE;TRUE;TRUE;TRUE;TRUE;TRUE;TRUE}*{FALSE;FALSE;TRUE;FALSE;TRUE;TRUE;TRUE;FALSE;FALSE;FALSE}****Output: {0;0;1;0;1;1;1;0;0;0}****Explanation:**Boolean values have numerical equivalents,**TRUE = 1**and**FALSE = 0 (zero)**. They are converted when performing an arithmetic operation in a formula.

**ROW($B$5:$E$14)****Output: {5;6;7;8;9;10;11;12;13;14}****Explanation:**The**ROW function**calculates the row number of a cell reference.

**MATCH(ROW($B$5:$E$14),ROW($B$5:$E$14))**-> becomes,**MATCH({5;6;7;8;9;10;11;12;13;14},{5;6;7;8;9;10;11;12;13;14})****Output: {1; 2; 3; 4; 5; 6; 7; 8; 9; 10}****Explanation:**The**M****ATCH function**returns the relative position of an item in an array or cell reference that matches a specified value in a specific order.

**IF((INDEX($B$5:$E$14,,$H$6)<=$H$5)*(INDEX($B$5:$E$14,,$H$6)>=$H$4),MATCH(ROW($B$5:$E$14),ROW($B$5:$E$14)),â€ťâ€ť)**-> becomes,**IF(****{0;0;1;0;1;1;1;0;0;0}),****{1; 2; 3; 4; 5; 6; 7; 8; 9; 10},â€ťâ€ť)****Output: {â€śâ€ť; â€śâ€ť; 3; â€śâ€ť; 5; 6; 7; â€śâ€ť; â€śâ€ť; â€śâ€ť}****Explanation:**The**IF function**returns one value if the logical test is**TRUE**and another value if the logical test is**FALSE**.

**SMALL(IF((INDEX($B$5:$E$14,,$H$6)<=$H$5)*(INDEX($B$5:$E$14,,$H$6)>=$H$4),MATCH(ROW($B$5:$E$14),ROW($B$5:$E$14)),â€ťâ€ť),)**-> becomes,**SMALL({â€śâ€ť; â€śâ€ť; 3; â€śâ€ť; 5; 6; 7; â€śâ€ť; â€śâ€ť; â€śâ€ť},ROWS(B19:$B$19))**-> becomes,**SMALL({â€śâ€ť; â€śâ€ť; 3; â€śâ€ť; 5; 6; 7; â€śâ€ť; â€śâ€ť; â€śâ€ť},1)****Output: 3****Explanation:**The**SMALL function**returns the**k-th****smallest value**from a group of numbers.**3**is the smallest in this group.

**INDEX($B$5:$E$14,SMALL(IF((INDEX($B$5:$E$14,,$H$6)<=$H$5)*(INDEX($B$5:$E$14,,$H$6)>=$H$4),MATCH(ROW($B$5:$E$14),ROW($B$5:$E$14)),â€ťâ€ť),ROWS(B19:$B$19)),COLUMNS($A$1:A1))**-> becomes,**INDEX($B$5:$E$14,3,,1)****Output: {3; â€śJohnnyâ€ť, 80, â€śBiologyâ€ť}****Explanation:**The**INDEX**function returns a value from a cell range(**$B$5:$E$14**), specified by the value based on a row and column number.

- Thirdly, press
**ENTER**on your keyboard.

Then, you will get the first extracted data that match your condition in the result cell. E.g. * Johnny* whose

*is*

**ID***got*

**3**

*80**marks*Â in

*and his record is stored in the dataset ahead of others, so we got*

**Biology****Johnnyâ€™s ID 3**in the result cell (cell

**B19**).

- Now, drag around the columns and rows by
**Fill Handle**to retrieve the details of only the students who gotfrom**Marks**to**80**.**100**

**Read More:** **How to Extract Data from Cell in Excel (5 Methods)**

**2. Incorporating Array Formula to Extract Data from Excel Based on Multiple Conditions**

In the above section, we extracted data based on a given range. But in this section, we will show you how to extract data based on multiple conditions.

Look at the same dataset as before but here instead of storing a range of values (marks * 80* to

*) as a condition, we stored multiple conditions such as retrieving studentsâ€™ details from both*

**100***and*

**Chemistry***departments.*

**Biology**The steps to extract data based on multiple conditions using the array formula are given below.

**Steps:**

- Firstly, store the conditions in other cells to work with those later. That means as we will be extracting studentsâ€™ details from
and**Chemistry**departments, we stored**Biology**and**Chemistry**in cells**Biology****G5**and**G6**respectively. - Secondly, in another cell, where you want the result (we wanted our result in cell
**B19**), write the following formula,

`=INDEX($B$5:$E$14,SMALL(IF(COUNTIF($G$5:$G$6,$E$5:$E$14),MATCH(ROW($B$5:$E$14),ROW($B$5:$E$14)),""),ROWS(B19:$B$19)),COLUMNS($B$5:B5))`

**Formula Breakdown**

**COUNTIF($G$5:$G$6,$E$5:$E$14)**-> becomes,**COUNTIF({â€śChemistryâ€ť;â€śBiologyâ€ť},{â€śMathâ€ť;â€śPhysicsâ€ť;â€śBiologyâ€ť;â€śChemistryâ€ť;â€śPhysicsâ€ť;â€śPhysicsâ€ť;â€śMathâ€ť;â€śChemistryâ€ť;â€śMathâ€ť;â€śBiologyâ€ť}****Output: {0;0;1;1;0;0;0;1;0;1}****Explanation:**The**COUNTIF function**allows us to identify cells in the range**$G$5:$G$6**that equals**$E$5:$E$14**.

**IF(COUNTIF($G$5:$G$6,$E$5:$E$14),MATCH(ROW($B$5:$E$14),ROW($B$5:$E$14)),â€ťâ€ť)**-> becomes,**IF({0;0;1;1;0;0;0;1;0;1},MATCH(ROW($B$5:$E$14),ROW($B$5:$E$14)),â€ťâ€ť)**-> becomes,**IF({0;0;1;1;0;0;0;1;0;1},{****1; 2; 3; 4; 5; 6; 7; 8; 9; 10},â€ťâ€ť)****Output: {â€śâ€ť; â€śâ€ť; 3; 4; â€śâ€ť; â€śâ€ť;â€śâ€ť; 8; â€śâ€ť;10}****Explanation:**The**IF function**has three arguments, the first one must be a logical expression. If the expression evaluates to**TRUE**then one thing happens (argument 2) and if**FALSE**another thing happens (argument 3). The logical expression was calculated in step 1,**TRUE**equals**1,**and**FALSE**equals**0 (zero)**. Row no**3, 4, 8,**and**10**evaluate**TRUE (1)**.

**SMALL(IF(COUNTIF($G$5:$G$6,$E$5:$E$14),MATCH(ROW($B$5:$E$14),ROW($B$5:$E$14)),â€ťâ€ť),ROWS(B19:$B$19))**-> becomes,**SMALL({â€śâ€ť; â€śâ€ť; 3; 4; â€śâ€ť; â€śâ€ť;â€śâ€ť; 8; â€śâ€ť;10},ROWS(B19:$B$19))**-> becomes,**SMALL({â€śâ€ť; â€śâ€ť; 3; 4; â€śâ€ť; â€śâ€ť;â€śâ€ť; 8; â€śâ€ť;10},1)****Output: 3****Explanation:**The**SMALL function**returns the**k-th****smallest value**from a group of numbers.**3**is the smallest in this group.

**INDEX($B$5:$E$14, SMALL(IF(COUNTIF($G$5:$G$6,$E$5:$E$14),MATCH(ROW($B$5:$E$14),ROW($B$5:$E$14)),â€ťâ€ť),ROWS(B19:$B$19)),COLUMNS($B$5:B5))**-> becomes,**INDEX($B$5:$E$14, 3, COLUMNS($B$5:B5))**-> becomes,**INDEX($B$5:$E$14, 3, 1)****Output: {3; â€śJohnnyâ€ť, 80, â€śBiologyâ€ť}****Explanation:**The**INDEX function**returns a value from a cell range(**$B$5:$E$14**), specified by the value based on a row and column number.

- Thirdly, press
**ENTER**on your keyboard.

Later, you will get the first extracted data that match your conditions in the result cell. E.g. * Johnny* whose

*is*

**ID***is from the*

**3***department and his record is stored in the dataset ahead of others, so we got*

**Biology****Johnnyâ€™s ID 3**in the result cell.

- Afterward, drag around the columns and rows by
**Fill Handle**to retrieve the details of only the students who are from theof**Department**and**Chemistry**.**Biology**

**Read More:** **Return Multiple Values in Excel Based on Single Criteria (3 Options)**

### 3. Applying FILTER Function to Extract Data Based on Criteria from Excel

You can also use the **FILTER function** to extract data based on criteria from Excel. Just follow the steps below.

**Steps:**

- At first, go to cell
**B19**and enter the following formula.

`=FILTER(B5:E14,(D5:D14>=H4)*(D5:D14<=H5))`

Here, **D5:D14** represents the range of * Marks* of the students.

- Secondly, press the
**ENTER**key.

**4. Using Filter Option to Extract Data Based on Range Criteria from Excel**

The **Filter** command in Excel is one of the most used and effective tools to **extract specific data** based on different criteria.

The steps to extract data based on a specific range using Excelâ€™s **Filter** are given below.

**Steps:**

- At first, select only the
**header**of the dataset. - Secondly, go to
**Data -> Filter**.

- Third, it will insert a
**drop-down button**in each header name of the dataset.

- Then, as we want to extract data based on the Marks, so click on the
**drop-down button next to the Marks**column. - Next, from the drop-down list, select
**Number Filters -> Betweenâ€¦**(again, as we are extracting data**between 80 to 100**, so we select the option**Between**. You can select any other options from the list according to your criteria).

- Now, from the pop-up
**Custom AutoFilter**box, select**80**from the**drop-down list**which will appear by simply clicking on the**drop-down button**next to**is greater than or equal to**label, and select**100**in the label box**is less than or equal to**. - Later, click
**OK**.

Finally, you will get all the details only for the students who got * Marks *from

*to*

**80***.*

**100****Read More:** **How to Extract Data from Image into Excel (With Quick Steps)**

**Similar Readings**

**How to Import Data into Excel from Another Excel File (2 Ways)****VBA Code to Convert Text File to Excel (7 Methods)****How to Convert Text File to Excel Automatically (3 Suitable Ways)****Convert Excel to Text File with Delimiter (2 Easy Approaches)****How to Import Text File with Multiple Delimiters into Excel (3 Methods)**

**5. Utilizing Advanced Filter to Extract Data from Excel Based on Range Criteria**

If you donâ€™t want to go through a lot of steps shown in the Filter section, you can use the **Advanced Filter** option in Excel to extract data based on a given range.

To utilize the advanced filter option in Excel, you have to define the condition in your worksheet to use later. See the following picture where we define our condition of extracting studentsâ€™ details of **Marks 80 **to** 100** in two different cells as **>=80** and **<=100** under **Marks** and we will be using the **cell reference numbers** of those cells later in our work.

The steps to extract data based on a particular range using Excelâ€™s **Advanced Filter** are given below.

**Steps:**

- Firstly, select the
**whole data table**. - Second, go to
**Data -> Advanced**.

- Finally, you will see the range of your
**selected data**in the box next to the**List range**option. - Then, in the box next to the
**Criteria range**, select the**cells carrying the defined conditions**. You will see the name of the worksheet will be auto-generated there, following the cell reference numbers holding the predefined conditions. - Lastly, click
**OK**.

As a result, you will get all the details only for the students who got * Marks *from

*to*

**80***.*

**100****Read More:** **Extract Filtered Data in Excel to Another Sheet (4 Methods)**

**6. Extract Data from Excel Defined Table Based on Range Criteria**

You can extract data from a defined table in Excel from your Excel worksheet using the **Filter** option. The steps to extract data from Excel defined table based on a certain range are given below.

**Steps:**

- Firstly, select
**any cell**(we selected cell**C6**) from your dataset and press**CTRL + T**. - Then, a pop-up
**Create Table**Box will appear, showing the range of your dataset as values. Keep the check box**My table has headers**marked. - Later, click
**OK**.

Consequently, it will **auto-generate a table** based on your dataset with a **drop-down button **along with the headers.

- Then, follow the
**steps shown in the previous method**to get the desired output.

At last, you will get an Excel-defined table carrying only the details of studentsâ€™ who got * Marks *from

*to*

**80***.*

**100****Read More: How to Extract Data From Table Based on Multiple Criteria in Excel**

**Keep in Mind**

- As the range of the data table array to search for the value is fixed, donâ€™t forget to put the
**dollar ($)**sign in front of the cell reference number of the array table. - When working with array values, donâ€™t forget to press
**CTRL + SHIFT + ENTER**on your keyboard if you are working with any other version rather thanÂ.**Microsoft Excel 365** - After pressing
**CTRL + SHIFT + ENTER**, you will notice that the formula bar enclosed the formula in**curly braces {}**, declaring it as an array formula. Donâ€™t type those**brackets {}**yourself, Excel automatically does this for you.

## Practice Section

For doing practice by yourself we have provided a **Practice** section like the one below in each sheet on the right side. Please do it by yourself.

**Conclusion**

In this article, we have learned how to extract data from Excel based on different criteria. I hope that this article has been very beneficial to you. Feel free to ask any questions if you have regarding the topic. Also, you may follow our website, **ExcelDemy**, a one-stop Excel solution provider to explore more about Excel-related information.

**You May Also Like To Explore**

**How to Import Data from Secure Website to Excel (With Quick Steps)****Transfer Data from One Excel Worksheet to Another Automatically with VLOOKUP****How to Convert Excel to Text File with Pipe Delimiter (2 Ways)****Import Data into Excel from Web (with Quick Steps)****How to Extract Data from a List Using Excel Formula (5 Methods)****Excel VBA: Pull Data Automatically from a Website (2 Methods)****How to Pull Data From Another Sheet Based on Criteria in Excel**