# Excel VBA: How to Divide Without Remainder (2 Easy Ways)

Get FREE Advanced Excel Exercises with Solutions!

The division is one of the most basic and frequent arithmetic operations in our daily life. At times, we need only the integer part from a division result which means division result without remainder. In this article, I will show you how to divide without remainder in Excel by using VBA.

## How to Divide Without Remainder by Using Excel VBA: 2 Easy Ways

Assuming that we have a data set of 5 dividends in cells B5:B9 and 5 divisors in cells C5:C9. Now, we need to perform the division process and get 5 quotients in cells D5:D9 as integers without remainders.

We want to accomplish this with Excel VBA. Follow any of the two ways given below to achieve this.

### 1. Division Using Backslash (\) Operator

We can divide numbers through Excel VBA by using the backslash (\) symbol to get the result as integers. Follow the steps below to do this.

ðŸ“Œ Steps:

• First and foremost, go to the Developer tab >> Visual Basic tool.

• As a result, the VB Editor window will appear.
• Following, go to the Insert tab >> Module option.

• Consequently, a new module named Module1 will be created.
• Now, double-click on Module1 and insert the following VBA code in the code window.
``````Sub Backward_Slash_Division()
Range("D5") = Range("B5") \ Range("C5")
Range("D6") = Range("B6") \ Range("C6")
Range("D7") = Range("B7") \ Range("C7")
Range("D8") = Range("B8") \ Range("C8")
Range("D9") = Range("B9") \ Range("C9")
End Sub``````
• Subsequently, press Ctrl + S on your keyboard.

• As a result, a Microsoft Excel dialogue box would appear. Click on the No button.

• Consequently, the Save As dialogue box would appear.
• Following, choose the Save as type: option as .xlsm file and click on the Save button.

• At this time, close the code window and go to the Developer tab >> Macros tool.

• As a result, the Macro window would appear.
• Following, click on the Backward_Slash_Division macro and click on the Run button.

Thus, the VBA code will run and give you the quotient without remainders for the divisions. And, the result should look like this.

Note
• If you need your result somewhere else, declare that cell range inside the left sideâ€™s Range function. And, if the dividend and divisor are in different cells apart from the used range in the example, declare those cell ranges in the right sideâ€™s Range function as your own requirements.
• If you use forward slash (/) instead of backslash (\) here, you will not get the integer quotient. Rather, you would get the actual quotient with decimals.

### 2. Using VBA Quotient Function to Divide One Cell by Another Without Remainder

Besides, you can use the Quotient function of VBAÂ to divide cells and get results without remainders. Follow the steps below to accomplish the result of this process.

ðŸ“Œ Steps:

• Similar to the first way, insert a module named Module2 in your Excel workbook.
• Following, insert the following VBA code in the Module2 code window and press Ctrl + S.
``````Sub Division_Quotient_Function()
Range("D5") = WorksheetFunction.Quotient(Arg1:=Range("B5"), Arg2:=Range("C5"))
Range("D6") = WorksheetFunction.Quotient(Arg1:=Range("B6"), Arg2:=Range("C6"))
Range("D7") = WorksheetFunction.Quotient(Arg1:=Range("B7"), Arg2:=Range("C7"))
Range("D8") = WorksheetFunction.Quotient(Arg1:=Range("B8"), Arg2:=Range("C8"))
Range("D9") = WorksheetFunction.Quotient(Arg1:=Range("B9"), Arg2:=Range("C9"))
End Sub``````

• Afterward, save the Excel file in .xlsm format following the previous way.
• Afterward, similar to the previous way, go to the Developer tab and click on the Macros tool to open the Macro window.
• Following, choose the Division_Quotient_Function macro and click on the Run button.

Thus, you will get your desired result as integers without any remainder and the final result should look like this.

Note

If you need your result somewhere else, declare that cell range inside the left sideâ€™s Range function. And, if the dividend and divisor are in different cells apart from the used range in the example, declare those cell ranges in the Arg: argument as your own requirements.

## Conclusion

So, in this article, I have shown you two easy ways to divide without any remainder in Excel VBA. You can also download our free workbook to practice. I hope you find this article helpful and informative. If you have any further queries or recommendations, please feel free to comment here.

## What is ExcelDemy?

ExcelDemy Learn Excel & Excel Solutions Center provides free Excel tutorials, free support , online Excel training and Excel consultancy services for Excel professionals and businesses. Feel free to contact us with your Excel problems.

Tags:

Tanjim Reza

Hello! I am Md. Tanjim Reza Tanim. I have just completed my B.Sc from Naval Architecture & Marine Engineering Department, BUET. Currently, I am working as an Excel & VBA content developer. I always had a great fascination with Microsoft Excel and its cool functions and formulas. Here, I am learning every day about new functions and formulas and working on applying MS Excel to the analysis of our real-life problems. I have great enthusiasm for learning any kind of new things, writing articles, and solving real-life problems.

We will be happy to hear your thoughts

Advanced Excel Exercises with Solutions PDF