I'll try:
For i = 2 To LastRow
i will equal an integer, so the first occurence using Rows("i:i") would
translate to Rows("2:2") which is syntax not recognized by VBA. If you used
Rows(i) it would translate to Rows(2) and would be recognized as the correct
syntax.
For a more detailed explanation, open the
VB editor (Alt+F11) and click on
help. Type "Referring to cells" in the search box and you will see three or
four references there that explain the different sytax used in refrerring to
cells and ranges of cells.
" wrote:
I wish to select a line i with i defined as
For i = 2 To Last_Row(Sheets("Stocks").Columns("A:A")) + 1
I wrote
Rows("i:i").Select
but it is not working. I am dumb. I still dont understand this story
of brakets, could someone take two minutes to explain it to me or tell
me where should I look, please?
Kind regards
Daniel