How to Express "Divisible By" in Excel

••• Urupong/iStock/GettyImages

You can use the "divisible by" operation in Excel documents to solve problems such as uniformly allocating resources to a certain number of people. Even though this operation is not part of the list of standard operations, you can define it using two other functions, if and mod. These use the idea that if the remainder for the division of two numbers is 0, then the first number is divisible by the second.

    Launch your Microsoft Excel document. Locate the two numbers you want to check the divisibility property for and note the name of their corresponding cells. The name of a cell is composed of a letter and a number. For example, the first cell of the first row in your document is labeled "A1."

    Click on an empty cell in your document and type "=MOD(cell1,cell2)" (without the quotes) inside it, where cell1 and cell2 are the names of the cells holding the two numbers. Press "Enter" to compute the remainder for the division of the two numbers.

    Click on another empty cell and type "=IF(cell=0,'Divisible','Not divisible')" (without double quotes) inside it, where cell is the name of the cell holding the remainder of the division. Press "Enter." If the first number is divisible by the second one, Excel displays "Divisible" in this cell. if it isn't, the software shows the message "Not divisible."


    • You can combine the two expressions into a single one, so you don't have to use two cells to express the divisibility property. Type "=IF(MOD(cell1,cell2)=0,'Divisible','Not divisible')" (without double quotes) into an empty cell, where cell1 and cell2 are the names of the two cells holding the numbers.


About the Author

Based in Manchester, United Kingdom, Mircea Gabriel Suciu has been writing articles in the field of technology since 2010. He is currently pursuing a Master of Engineering degree in computer science from the University of Manchester.

Dont Go!

We Have More Great Sciencing Articles!