While working in Excel we may need to find the median value in a range of data that actually reflects the median level of the dataset. We can calculate it easily by using the **MEDIAN **function in MS Excel. This article will guide you with 4 simple examples and proper illustrations to use the **MEDIAN **function for finding the median of a data range.

**Table of Contents**hide

**Download Practice Workbook**

You can download the free Excel template from here and practice on your own.

**Introduction to the MEDIAN Function**

**Function Objective:**

The **MEDIAN** function is classified under the statistical function. This function returns the **median **of a group of numbers. That is actually the number in the middle of a set of numbers.

**Syntax:**

**=MEDIAN (number1, [number2], â€¦)**

**Arguments Explanation:**

Arguments |
Required/Optional |
Explanation |

number1 |
Required |
A number or cell reference that refers to numeric values. |

number2 |
Optional |
A number or cell reference that refers to numeric values. |

**4 Examples of Using the MEDIAN Function**

Letâ€™s introduce the dataset first. My dataset represents some studentsâ€™ obtained marks in a Mathematics class test out of 20 marks.

**Example 1: Use the Excel MEDIAN Function for Odd Number of Data**

Take a look that the number of students in our dataset is 7 which is an odd number. Now we want to find the middle number (median) of the series. So, if we use the **MEDIAN **function here, we can simply find the middle numbers of values in the series. Iâ€™ll show the output in **Cell C13**.

**Steps:Â **

âŹ© Activate **Cell C13**.

âŹ© Type the following formula in it:

`=MEDIAN(C5:C11)`

âŹ© Then just hit the **Enter **button to get the result.

Now you will see that we have got the middle value of our data-

**Read More:** **How to calculate Average, Median, & Mode in Excel**

**Example 2: Apply MEDIAN Function for Even Number of Data**

Here, I have added a row to make the series even. Now Iâ€™ll show how to find the median of this series. As it is an even series so the median will be the average of two middle numbers.

**Steps:Â **

âŹ© Write the following formula in **Cell C14**:

`=MEDIAN(C5:C12)`

âŹ© Press the **Enter **button to finish.

Now you will spot that the median is the average of the values 14 and 15 for even series.

**Read More:** **The Different Ways of Counting in Excel**

**Similar Readings**

**How to Use LINEST Function in Excel (4 Suitable Examples)****Use CORREL Function in Excel (3 Examples and VBA)****How to Use MAX Function in Excel (6 Examples)****Use LARGE Function in Excel (6 Easy Examples)****How to Use RANK Function in Excel (With 5 Examples)**

**Example 3: Use MEDIAN Function for Discontinuous Data Range**

If the data range is discontinuous then we can apply the **MEDIAN **function too to find the median. For example, Iâ€™ll find the median for the first two and last three numbers of the series then just select the range individually by using a comma in the **MEDIAN **function. That means, weâ€™ll find the median of the numbers- 10,12,15,18,16.

**Steps:Â **

âŹ© In **Cell C14** type the following formula:

`=MEDIAN(C5:C6,C10:C12)`

âŹ© Finally, just hit the **Enter **button.

Then you will get the output like the image below-

**Example 4: Combine MEDIAN with IF for Excluding Zero in a Data Range**

If you had zero in your data range and you donâ€™t want to include it in the **MEDIAN **function then you can use **the IF function** with the **MEDIAN **function. The **IF **function is a logical function that is used to return one value if a condition is true and another value if itâ€™s false. So here, the **IF **function will exclude zero from the data range by a logical test.

**Steps:Â **

âŹ© Write the following formula in **Cell C14**:

`=MEDIAN(IF(C5:C12>0,C5:C12))`

âŹ© Later, just click the **Ctrl+Shift+Enter **button.

Hereâ€™s our output excluding zero-

âŹ¬** Formula Breakdown:**

**âžĄ**** IF(C5:C12>0,C5:C12)**The

**IF**function will check the values if they are greater than zero or not. If greater then it will return the value otherwise it will return FALSE. So the output will return as-

**{10;FALSE;12;15;14;15;18;16}**

**âžĄ**** MEDIAN(IF(C5:C12>0,C5:C12))**Finally, the

**MEDIAN**function will find the median of values extracted from the IF function that returns-

**15**

**Conclusion**

I hope all of the methods described above will be good enough to use the MEDIAN function in Excel. Feel free to ask any question in the comment section and please give me feedback.