ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   select range (https://www.excelbanter.com/excel-programming/411228-select-range.html)

geebee

select range
 
hi,

i have the following:
Range("A5000").End(xlUp).Offset(0, 0).Select

the only problem is this is being run when the sheet is in Autofilter mode.
I want the range to be selected, except for the header row. How can i modify
this?

thanks in advance,
geebee


Alan

select range
 
I take it that your header row is in row 1 (A1):

Range(Range("A2"), Range("A500").End(xlUp)).Select

Also, you don't need Offset(0, 0). This does nothing unless one of the
values in the parenthesis is less than or greater than 0.

Alan


"geebee" wrote:

hi,

i have the following:
Range("A5000").End(xlUp).Offset(0, 0).Select

the only problem is this is being run when the sheet is in Autofilter mode.
I want the range to be selected, except for the header row. How can i modify
this?

thanks in advance,
geebee



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

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