For Next Loop in Excel VBA

How to implement a ‘for … next’ loop macro to automate calculations in Excel: Let’s say you have entered the name and salary of all your employees. Now based on the basic salary and other compensation criteria you wish to calculate things like house rent allowance, conveyance allowance, medical allowance, etc and arrive at a total pay package then you can easily do these calculations using a ‘for… next’ loop. The ‘for.. next’ loop in a macro is a powerful tool. The starting and end points of the calculaions to be performed must be clearly defined. In our example, the calculation starts at row 2 and ends at row 10. We have input the names of the items, unit price and the quantity and automated the calculation of the amount. The training video demonstrates the use of ‘for next’ loop in Excel.

View the training video:

Further reading:
How to write a macro in Excel

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.