ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Range question (https://www.excelbanter.com/excel-programming/358134-range-question.html)

JamesJordan

Range question
 
Is it possible to select a range that spans the row right before the
last used row through the last row. I have a table with info that
spans columns A through S. I am wanting to be able to select the last
two rows for colmns A:S to do some formatting. I thought it would look
something liek this, but it keeps showing up as incorrect. i am quite
sure how to write it. I would appreciate any help.

Here is what I have that I know is not quite right.

Range(("A" & Rows.Count - 1):"S" & Rows.Count).Select


Jim Thomlinson

Range question
 
Range(cells(Rows.Count , "A").end(xlUp).offset(-1, 0), cells(Rows.Count,
"S").end(xlUp)).Select
--
HTH...

Jim Thomlinson


"JamesJordan" wrote:

Is it possible to select a range that spans the row right before the
last used row through the last row. I have a table with info that
spans columns A through S. I am wanting to be able to select the last
two rows for colmns A:S to do some formatting. I thought it would look
something liek this, but it keeps showing up as incorrect. i am quite
sure how to write it. I would appreciate any help.

Here is what I have that I know is not quite right.

Range(("A" & Rows.Count - 1):"S" & Rows.Count).Select



Bob Phillips[_6_]

Range question
 

Range(Cells(Rows.Count, "A").End(xlUp).Offset(-1, 0)).Resize(2).Select

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"JamesJordan" wrote in message
oups.com...
Is it possible to select a range that spans the row right before the
last used row through the last row. I have a table with info that
spans columns A through S. I am wanting to be able to select the last
two rows for colmns A:S to do some formatting. I thought it would look
something liek this, but it keeps showing up as incorrect. i am quite
sure how to write it. I would appreciate any help.

Here is what I have that I know is not quite right.

Range(("A" & Rows.Count - 1):"S" & Rows.Count).Select





All times are GMT +1. The time now is 05:55 PM.

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