selecting column down to variant cell
Bernie,
The OP should go with Ron's code which works from the bottom of the page -
up
Your code works from the top down and will stop at the 1st blank cell. The
OP says that there are sporadic blank cells...
--
steveB
Remove "AYN" from email to respond
"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
John,
This is how your code should have been written to work:
Range("A9").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 5).Select
Set c = ActiveCell
Range("f9").Select
Range(Selection, c)).Select
But this one line will work just as well
Range("A9", Range("A9").End(xlDown)).Offset(0, 5).Select
HTH,
Bernie
MS Excel MVP
"John" wrote in message
...
Is it possible to find the bottom of a sheet, say there are 1500 entries
in
column A... and then select F9:F1500 if column F doesn't have values in
every
row?
For example, the next time the macro is run thier maybe 1505 rows in the
sheet...
here is a test code that doesn't work for me... but may help convey my
idea.
Dim c As Variant
Range("A9").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 5).Select
Set c = ActiveCell
Range("f9").Select
Range(Selection, Selection.c(xlDown)).Select
|