czchlong
czchlong

Reputation: 2574

Excel VBA for selecting an entire column starting from a specific cell

How do I select the entire column after a specific cell?

For example, I would like to select the entire column after C24 so that includes C24, C25, ...

I have worked with the following snippet with no success:

ActiveSheet.Range("C24", ActiveSheet.Range("C24").End(xlDown)).Select

Could someone please correct my error?

Upvotes: 9

Views: 54344

Answers (3)

Jeremiah
Jeremiah

Reputation: 1

i don't know if you want a formula for it or if any method will work but if you select the cell you want it to start on and hold ctrl+shift+down arrow it will select that cell and everything below it.

Upvotes: 0

Doug Glancy
Doug Glancy

Reputation: 27478

Here's an approach that will work even if there are cells with content below C24:

With ActiveSheet
.Range(.Range("C24"), .Range("C" & .Rows.Count)).Select
End With

Upvotes: 8

A. Webb
A. Webb

Reputation: 26446

You just need to wrap the two references within a Range:

Range(ActiveSheet.Range("C24"), ActiveSheet.Range("C24").End(xlDown)).Select

Upvotes: 11

Related Questions