Simple Selection Macro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm a beginner, and need some code that will do the following. Suppose I
have cell C10 selected. I want the macro to look at the current selection,
and then highlight the entire rows from the current selection down to the
last row (meaning 65,000+). Thanks
 
Hi,
something like:

Sub SelectAllRowsBellow()
If Selection Is Nothing then Exit Sub
If TypeName(Selection)<>"Range" Then Exit Sub
Range(Selection,Range("A65536")).EntireRow.Select
End Sub

Regards,
Sebastien
 
Why would you want to do this?

Sub selectall()
Range(Cells(ActiveCell.Row, "a"), Cells(65536, "a")).EntireRow.Select
End Sub
 
Another way just for fun

activecell.resize(rows.count-activecell.row+1,1).entirerow.select

You can also do it with Ctrl-Shift-Down-Arrow then Right-Arrow.

But as Don said, why?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top