• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Selecting Empty Cells

Mickey mouse question...


How do I write the code beneath as one line?


Range("A2").Select

Selection.End(xlDown).Select


With Selection

Range(.Cells(1, 1), .End(xlUp)).Offset(0, 1).Select

End With


Objective Example:

With data in A2:A20, my objective is to select B2:B20 (even though the length of "A" was unknown).


Details:

The code above works fine, but I could get more use out of it as one line.


The B column is empty.


I will not know the length of "A", which is why I'm using Offsets and such.
 
Range(Cells(2, 1), Cells(2, 1).End(xlDown)).Offset(0, 1).Select
 
Back
Top