ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   select last 3 rows of variable length coloumn in excel 2003? (https://www.excelbanter.com/excel-programming/339166-select-last-3-rows-variable-length-coloumn-excel-2003-a.html)

Jay

select last 3 rows of variable length coloumn in excel 2003?
 
I have text in a coloumn. The number of rows in the coloumn can vary. Can
somebody help me with either excel marco command(s) or VB script that can
select last 3 rows of the coloumn from when the active cell is at the header
row of the coloumn. One can assume the coloum always contains at least 3
rows.

Thanks in advance

Norman Jones

select last 3 rows of variable length coloumn in excel 2003?
 
Hi Jay,

Try:

Cells(Rows.Count, ActiveCell.Column).End(xlUp).Offset(-2).Resize(3).Select


---
Regards,
Norman



"jay" wrote in message
...
I have text in a coloumn. The number of rows in the coloumn can vary. Can
somebody help me with either excel marco command(s) or VB script that can
select last 3 rows of the coloumn from when the active cell is at the
header
row of the coloumn. One can assume the coloum always contains at least 3
rows.

Thanks in advance





All times are GMT +1. The time now is 03:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com