Excel MOD Function

This post will guide you how to use Excel MOD function with syntax and examples in Microsoft excel.

Description

The Excel MOD function returns the remainder of two numbers after division. So you can use the MOD function to get the remainder after a number is divided by a divisor in Excel. And the returned result will have the same sign as divisor.

The MOD function is a build-in function in Microsoft Excel and it is categorized as a Math and Trigonometry Function.

The MOD function is available in Excel 2016, Excel 2013, Excel 2010, Excel 2007, Excel 2003, Excel XP, Excel 2000, Excel 2011 for Mac.

Syntax

The syntax of the MOD function is as below:

=MOD (number, divisor)

Where the MOD function arguments are:

  • number – This is a required argument.The number that you want to get the remainder.
  • divisor – This is a required argument. The number that you want to divide number.

Note:

  • If the divisor is 0, then the MOD function will return the #DIV/0! Error.
  • The MOD function returns a result in the same sign as the divisor.

Excel MOD Function Examples

The below examples will show you how to use Excel MOD Function to get the remainder after number is divided by divisor.

1# to get the remainder of 6/5, enter the following formula in Cell B1.

=MOD(6,5)

excel mod examples1 - Copy

2# 1# to get the remainder of -6/5, enter the following formula in Cell B1.

=MOD(-6,5)

excel mod examples2 - Copy

You will see that the sign is the same as divisor.


Related Functions

  • Excel INT Function
    The Excel INT function returns the integer portion of a given number. And it will rounds a given number down to the nearest integer. The syntax of the INT function is as below:= INT (number)…

More Excel MOD Formula Examples

  • Transpose Multiple Columns into One Column
    You can use the following excel formula to transpose multiple columns that contain a range of data into a single column, and you can also write an Excel VBA Macro to transpose the data of range in B1:D4 into single column F quickly…
  • Delete Every Other Row
    To delete every other row in Excel, you need to filter alternate rows, and then select those rows, and delete them at once. So you need to create a helper column using MOD function with ROW function…
  • Highlight Multiples of Specific Value
    If you want to highlight numbers that are multiples of a specific number, and you need to find those numbers firstly and then you can use the conditional formatting feature to highlight it. You need to create a formula based on the MOD function….
  • Create a Five Star Rating System
    How do I change the five points system to five star rating in excel. How to use the conditional formatting function to create a five star rating system in excel…..
  • Sum Every Nth Row or Column
    If you want to sum every nth rows in Excel, you can create an Excel Array formula based on the SUM function, the MOD function and the ROW function..….
  • Generate All Possible Combinations of Two Lists
    You can use a formula based on the IF function, the ROW function, the COUNTA function, The INDEX function and the MOD function to get a list of all possible combinations from those two list….
Related Posts

Working Time Calculation Based on Timesheets

In the office, a special machine record the time when you start working (clock in office) and when you finish working (clock out of office). We can calculate the total working time by subtracting the end working time from the ...

Add Minutes to Time in Excel
Add Minutes to Time1

Adding whole hours or decimal minutes to a given time in Excel is a fairly simple process. You can do this by using the Start_time+TIME(0,minutes,0) and Start_time+minutes/1440 functions. In this add minutes to time guide, we will show you how ...

Add Hours To Time in Excel
add hours to time1

Adding whole hours or decimal hours to a given time in Excel is a fairly simple process. You can do this by using the Start_time+TIME(hours,0,0) and Start_time+hours/24 functions. In this add hours to time guide, we will show you how ...

Extract or Filter Every Nth Row
filter every nth row1

Assume that you're in a situation where you need to filter every nth row from a list having a few values. I'm pretty sure you'd choose to do it manually, which is also a great choice when you only have ...

How to Sum Every Nth Column in Excel
Sum Every Nth Column 27

Sometimes for data listed in rows, we may want to sum data every Nth column, for example sum data only in ODD column or EVEN column (every 2 column). In our daily life, we may meet many cases like this. ...

How to Count Cells that Contain even or odd numbers in Excel
count cells that contain even numbers5

This post will guide you how to count the number of cells that contain odd or even numbers within a range of cells using a formula in Excel 2013/2016.How do I count cells that contain odd numbers through the use ...

How to Highlight Every Other Row or Every Nth Row in Excel?
How to Highlight Every Other Row or Every Nth Row in Excel 11

Sometimes we may want to highlight every other row or every Nth row in a spreadsheet to make data in different rows looks more clearly. Though we can apply table styles to highlight table rows automatically, we can also highlight ...

How to Calculate Total Work Days or Hours Exclude Weekends/Holidays in Excel
Calculate Total Work Days or Hours 15

In our daily work we often need to count the total working-days or working-hours for employees then we can pay for them the salary in some cases. But we have to count the total exclude weekends or holidays as we ...

How to Stack Data from Multiple Columns into One Column in Excel
Stack Data 12

In previous article, I have shown you the method to split data from one long column to multiple columns by VBA and Index function. This time if we want to stack data from multiple columns to one column, how can ...

How to Convert Julian Date to a Calendar date in Excel
convert julian date to calendar date3

This post will guide you how to convert Julian date to a calendar date in Excel. How do I convert a given Julian Date to a calendar date with a formula in Excel. What is Julian Date? Julian day number ...

Sidebar