Reputation: 71
I know how to select a range till a calculated last row using vba as such:
Range("P3:R" & LastRow).Select
Is there a way to select non-adjacent column data? For example I want cells from column N to R WITHOUT column O
Tried below, but it ends up selecting O too, I suspect because the "
character should encompass the whole thing, but then how do I keep the variable value for last row?
Range("N3:N" & LastRow , "P3:R" & LastRow).Select
Thanks!
Upvotes: 7
Views: 23286
Reputation: 13386
you can use
Range("N3:N" & LastRow & "," & "P3:R" & LastRow).Select
or
Intersect(Range("N:N, P:R"), Rows(3).Resize(LastRow - 3)).Select
Upvotes: 8