Youtube RSS Feed
Learn with Vikas Suhag
Number error in MS excel while using MOD formula alternative
Jan 03, 2022   Vikas Suhag
MOD formula number error solution

Simple division provides us with quotient like 15/6 will give 2 in output.
MOD formula gives the remainder of divison. For example 15/6 will give 3 as output.

MOD is represented by % symbol in programming languages.

MOD formula is helpful in many situation like

1. when we are looking to find a series of numbers which are divisible by certain number. For example we have a list of roll numbers of students and needed to divide students in 4 groups. So we can divide each roll number with 4 and remainder of divison will decide the group of student. 13 MOD 4=1 is assigned group 1, similary 15 MOD 4=3 will be assigned group 3.

2. whenever we have to take decision about number on the basis of their last digit
In this scenario we can use Number MOD 10=last digit. Accordingly we can take the decision.

Lets us illustrate this using MS Excel.
Fig 1 show the Roll Number and corresponding groups using the MOD formula.

MOD Formula

Fig 1

But there is one exception in MOD formula. It fails when number is greater than 10 digits long.

MOD formula number error

But there is simple mathematical solution to this


=RollNumber-(INT(RollNumber/divisor)*divisor)


This formula can replace the MOD formula and work in every case.
Lets apply

MOD formula number error solution

 


Leave a Comment

* Email will not be published.
All comments are only visible after approval.
Most Viewed articles
Search
Subscribe to Email Updates
Vikas Suhag

I am Engineer, Developer, Teacher, Blogger, Vlogger, Traveller, Photographer...

I have been developing websites, writing blogs and recording videos during my travel while being a full tim ...

Youtube Channel
Podcast
Subscribe to Email Updates
Connect With Us
Youtube RSS Feed
© 2022 Learn with Vikas Suhag. All Rights Reserved.