top of page
Search

# Basic Excel Function - How to use MOD Function in Excel

Updated: Sep 29, 2021

For today’s Excel tutorial, I will be showing you an important function called MOD. The MOD function returns the remainder after a number is divided by a divisor. Finding the remainder value of a division could be done through a calculator. However large data set could be challenging for a calculator to manage. Hence, the MOD Function in Excel could resolve this issue.

We will also show you how to convert your MOD function into an API at the end of the video.

## Article

For today’s Excel tutorial, I will be showing you an important function called MOD. The MOD function returns the remainder after a number is divided by a divisor. Finding the remainder value of a division could be done through a calculator. However large data set could be challenging for a calculator to manage. Hence, the MOD Function in Excel could resolve this issue.

## How to use MOD Function

In our example, we are given a list of numbers of our best employees eligible for the company’s Las Vegas Team Building Retreat. We are task to assign 2 employees per room and determine how many remaining employees are left without a room and re-adjust the remainder of employees into a room.

First, we will assign 2 employees per room and find out how many remainders employee is left without a room. Select Cell C12, type in equal, MOD, open parentheses. Move your cursor and select C4, comma, space and type in 2. Close Parentheses and hit return. You will get 0. Great news, no remainder in Management. Alright, let us find out the result for the rest of the departments with auto-fills.

We can notice that there are some 1 in the departments. I will be using the conditional formatting to highlights the 1. Select conditional formatting, highlight cells rules, equal to. Type in 1 and click ok. Now, all the 1 are more visible to identify.

Secondly, we will sum and find the remainder employees without a hotel room. For this, we will need to use the SUM, IF and MOD. Select Cell C19, type in equal, SUM, open parentheses. Type in IF, open parentheses, MOD and open parentheses. Select Cell C12 and drag your cursor to Cell H17. Type in comma, space, 2 and close parentheses. Type in equal, 1, comma and space. Move your cursor to Cell C12. Select and drag to Cell H17. Type in comma, space, open and close quotes. Double close parentheses and hit return. You will get 14. The sum of remaining employees without a hotel room.

Lastly, we will reallocate the remainder employee to a hotel room. Select Cell C20, type in equal, MOD, open parentheses. Move your cursor and select C19, comma, space and type in 2. Close parentheses and hit return. You will get 0. Excellent. Now all our employee is assigned to a room.

## Intermission

There you have it, the MOD function for Excel. If you have any excel formula you want us to teach, let us know in the comment section below. Don't forget to subscribe, hit the bell button and turn on the notification to have more free excel function tutorials. But, before you go, we have a bonus clip for you. I will be turning this Excel spreadsheet into an API. Stay tuned to see how the magic works.

## Convert MOD Function into Application Programming Interface (API)

I will be using AlchemyJ Studio Excel Add-in to turn this MOD function Excel into an API. To do this, I will need AlchemyJ Excel installed and with a pre-set of rules. Now, I will click on Generate API. The file is now converting. Okay, your API is ready.

Next, I will select the AlchemyJ tab and launch this open API that AlchemyJ generates. I will expand this tab, and select try it out. I will input 133 and select execute. Nice, we have gotten a remainder of 1. Now, let us retry again with 130. Awesome, we have a remainder of 0, which is correct.

## Closing

AlchemyJ Studio Excel Add-in turns your Excel business model into API. This way, you can integrate your Excel model into other applications. You can download AlchemyJ Studio Excel Add-in for free at alchemyj.io. And once again, thank you for watching. So which Excel function you wish to be converted into an API? Let us know in the comment section below. Lastly, don't forget to subscribe, hit the bell button and turn on the notification. See you soon.