Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can run a macro ( call a macro) on selection of any filtercriteria? | Excel Worksheet Functions | |||
Copy Selection - Transpose Selection - Delete Selection | Excel Discussion (Misc queries) | |||
Simple Macro | Excel Discussion (Misc queries) | |||
Simple selection, but hey, I'm no guru!! | Excel Worksheet Functions | |||
Simple Macro (I think) | Excel Programming |