XL: MOD() Function Returns #NUM! Error Value

This article was previously published under Q119083
This article has been archived. It is offered "as is" and will no longer be updated.
For a Microsoft Excel 2001 or Microsoft Excel 98 version of this article, see 119083.
The MOD() function in Microsoft Excel may return a #NUM! error valueinstead of a valid remainder (modulus).
The MOD() function returns the #NUM! error if the following condition is true:
('divisor' * 134217728) is less than or equal to 'number'
If the above condition is true, and the MOD() function returns a#NUM! error, you can use the following formula to calculate the remainder(modulus) of two numbers:
For example, instead of using this formula
use this formula:
In Microsoft Excel, the MOD() function returns the remainder (modulus) of dividing one number by another. The MOD() function accepts two arguments:
   Argument   Definition   --------------------------------------   Number     The number being divided   Divisor    The number being divided by				
If you want to calculate the remainder (modulus) of 22 divided by 5,you would use the following formula:
The result is 2 (22 divided by 5 leaves a remainder of 2).

If the divisor argument, multiplied by 134,217,728 (or 2 raised to the 27thpower), is less than or equal to the number argument, the MOD() functionreturns a #NUM! error value.

Article ID: 119083 - Last Review: 12/04/2015 10:23:45 - Revision: 2.1

Microsoft Excel 2000 Standard Edition, Microsoft Excel 2002 Standard Edition, Microsoft Excel 97 Standard Edition

  • kbnosurvey kbarchive kbprb KB119083