indi visual
Member
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.
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.