How do I do a For loop in VBA?
A For loop is a powerful programming technique. It allows you to repeat a process multiple times with only a few lines of code. Below is an example of a For loop, For i = 1 To 6 Cells( i, 1 ) = i Next i A For loop will always start with the key word "For" followed by a veritable. In the example above "i" was the For loop variable. You then set the variable equal to a starting value, in this case 1, and an ending value, in this case 6. You can now use that variable anywhere within the For loop where you want iterate its value. In the example, I chose to iterate the cell row and the value being write to that cell. To loop the For loop you use the key work "Next" followed by your For loop variable. In the above example, the for loop will iterate the value of "i" from 1 to 6. In the first loop Cells( 1, 1 ) will equal 1. Then the code will loop because it says "Next i" and the value of "i" will become 2. The code in the second loop will then say Cells( 2, 1) = 2. This process will continue all the way until "i" becomes 6. At the end of that sixth loop the For loop will end and the rest of your code, if any, will continue.
What is the difference between weight and mass?
Mass is determined by the total amount of material an object is made up of, while weight is the force of gravity acting on that object. $$ weight=mass * gravity $$ Another way to think about this is, an object on the Earth and on the Moon will have the same mass, however that object will have less weight in the moon because gravity on the moon is less.
what does product and quotient mean?
The product of two numbers is a mathematical way of saying multiplication. The product of 6 and 3 is 18, because $$6*3=18$$. Whenever you hear product just think multiplication. On the other hand The quotient of two numbers is a mathematical way of saying division. The quotient of 6 and 3 is 2, because $$6/3=2$$. Whenever you hear quotient just think divition.