Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 367
Default Simple Selection Macro

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Simple Selection Macro

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

"Jason" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default Simple Selection Macro

Why would you want to do this?

Sub selectall()
Range(Cells(ActiveCell.Row, "a"), Cells(65536, "a")).EntireRow.Select
End Sub


--
Don Guillett
SalesAid Software

"Jason" wrote in message
...
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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Simple Selection Macro

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?

--

HTH

RP

"Don Guillett" wrote in message
...
Why would you want to do this?

Sub selectall()
Range(Cells(ActiveCell.Row, "a"), Cells(65536, "a")).EntireRow.Select
End Sub


--
Don Guillett
SalesAid Software

"Jason" wrote in message
...
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





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can run a macro ( call a macro) on selection of any filtercriteria? [email protected] Excel Worksheet Functions 7 February 20th 09 12:34 AM
Copy Selection - Transpose Selection - Delete Selection Uninvisible Excel Discussion (Misc queries) 2 October 23rd 07 04:18 PM
Simple Macro sparx Excel Discussion (Misc queries) 4 May 12th 06 06:25 AM
Simple selection, but hey, I'm no guru!! Director Excel Worksheet Functions 1 August 18th 05 01:56 PM
Simple Macro (I think) Jason Excel Programming 4 September 9th 04 02:54 AM


All times are GMT +1. The time now is 07:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"