Forum Discussion
Unusual behaviour in excel
It was meant to teach me the difference between a range select and a cells select. As it was indicated in the sub name it was meant merely to teach me different select commands. While thanking you for your response it gives no explanation as to why the selection jumps to the 13th row when I gave the code to select the 7th row !
Paul_Fernando wrote: ``While thanking you for your response it gives no explanation as to why the selection jumps to the 13th row when I gave the code to select the 7th row``
Arguably, I was too presumptuous about your ability to interpret the English description.
I wrote: ``rng.Cells(7, 1).Select selects the 7th row, 1st column relative to the upper-left of the range defined for rng, namely A7:C7``.
"Relative to" means "add 7" (minus 1). "Upper-left of the range" refers to A7.
So rng.Cells(7, 1).Address is A13 because the row number is 7 (from A7) plus 7 (from Cells(7,1)) minus 1.
Also, the column number is 1 (for A) plus 1 (from Cells(7,1)) minus 1.
I hope "minus 1" is obviously. It is simply how we count the "n-th" ordinal position.