Trying to select values in a column with blanks

  • Thread starter Thread starter TBA
  • Start date Start date
T

TBA

Suppose in the range A1:A10 I have values that are the days of the week, but
cells A3 and A7 are blank. How do I write a VBA statement that will select
a range that includes all the values in column A (assuming there is no other
data in the worksheet)? I seem to remember there being an xlUp or xlDown
method, but I'm not sure of the syntax. If I'm not mistaken, there should
be a way to code it so that it will work for a list of any size.

Thanks for any suggestions!

-gk-
 
Vasant,

Thank you very much!

Now suppose on the same worksheet I have another list in column B, and this
list has blanks also. How would I then select just that list? I tried
manipulating the code in your reply to work for column B, but it ended up
selecting both lists.

As usual, all help greatly appreciated.

-gk-
 
Nevermind, got it! :)

-gk-

TBA said:
Vasant,

Thank you very much!

Now suppose on the same worksheet I have another list in column B, and this
list has blanks also. How would I then select just that list? I tried
manipulating the code in your reply to work for column B, but it ended up
selecting both lists.

As usual, all help greatly appreciated.

-gk-
 
Back
Top