Let's say you have data in rows 3 to 10. Now you know the starting and end points of your data. Using the for next loop you can perform the calculations. The code now looks like this:
Sub calculations()
For Row = 3 To 10
Cells(Row, 4) = Cells(Row, 3) * Cells(Row, 2)
Cells(Row, 5) = Cells(Row, 4) * 0.125
Cells(Row, 6) = Cells(Row, 4) + Cells(Row, 5)
Next Row
End Sub The online training video clarifies the concept in detail.
Build a website that automatically earns money through Adsense and Clickbank! Get Your Risk Free 60 Day Trial of Socrates!
For Next Loop Excel Macro for calculations
|