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:
How to write a macro in Excel