VBA Code Translation (meaning)

hello, I’m pretty new into this and I am trying to understand a code.  Often I see a variable declared as iCntr  As Long.

it’s used  when looping from last row in a column, and the code usually is

LastRow =Range("A65000").End9xlUp).Row
For iCntr = 1 toLastRow

What does this line exactly do?


Contributor Asked on February 18, 2017 in VBA: Macros.
Add Comment
1 Answer(s)


The below statement generally  used for to find last row in a 1st Column(A- Column)  and then assigning last row value to a variable called ‘LastRow’.
LastRow =Range(“A65000”).End(xlUp).Row

The following statement is used for to loop through each row starting from 1st Row to last row.

For iCntr = 1 to LastRow



Expert Answered on February 18, 2017.
Add Comment
  • Found this useful?

    Please share using the share button above.

    If you found the answer is best answer for your question, Please mark as 'best answer' by clicking on the right tick mark icon at the left side of the answer.

    Found the answer useful and wants to credit the user, then vote the answer (vote up).

  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.