ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel 2000 VBA - Selecting populated range (https://www.excelbanter.com/excel-programming/305150-excel-2000-vba-selecting-populated-range.html)

sub_pop[_4_]

Excel 2000 VBA - Selecting populated range
 
I have the following worksheet:

5 columns x ~100 rows

Already sorted by Column E in ascending order

Column E is null after the first ~10 rows.

I want to Select the range of rows where E is not null (usually abou
the first 10 rows)

I tried creating a counter in the loop that populates column E one ro
at a time then selecting it by:

Range("A1:E" & counter).Select
or by Range("A1,E" & counter).Select
then I tried Range("1:" & counter).Select etc.

This does nothing. Any help is appreciated!

Mar

--
Message posted from http://www.ExcelForum.com


Tom Ogilvy

Excel 2000 VBA - Selecting populated range
 
Range("E1",Cells(rows.count,5).End(xlup)).offset(0 ,-4).Resize(,5).Select
--
Regards,
Tom Ogilvy


"sub_pop " wrote in message
...
I have the following worksheet:

5 columns x ~100 rows

Already sorted by Column E in ascending order

Column E is null after the first ~10 rows.

I want to Select the range of rows where E is not null (usually about
the first 10 rows)

I tried creating a counter in the loop that populates column E one row
at a time then selecting it by:

Range("A1:E" & counter).Select
or by Range("A1,E" & counter).Select
then I tried Range("1:" & counter).Select etc.

This does nothing. Any help is appreciated!

Marc


---
Message posted from http://www.ExcelForum.com/





All times are GMT +1. The time now is 01:02 AM.

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