Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selection.End(xlDown) with Rows selected
This should work:
For just selecting the column "N" range would be: Range("N1", Range("N1").End(xlDown)).Select To select all the rows of the N column range: Range("N1", Range("N1").End(xlDown)).EntireRow.Select Tokash -----Original Message----- Hello - haven't been on this group in years, but I just came across a problem, and I'm not sure if the syntax has changed since older versions of Excel, but I can't make this work. I'm attempting to select row 1, make N1 the active cell, and then select down through the range (thus choosing all the rows in the range, but using column N as the active column). When I do the following code, it uses A as the active row and, ultimately, the entire range is not selected: Rows("1:1").Select Range("N1").Activate Range(Selection, Selection.End(xlDown)).Select I thought about choosing just N1, selecting the range down, and then selecting all the rows, but I can't make that work for a dynamic range (i.e. without it choosing specifically the number of rows I have in the example I'm using through the macro recorder). I'm admittedly not the most proficient programmer, but I remember I used to know how to manually adjust for this, and it either slipped my memory or that syntax has changed. Probably the former... Any help would be most appreciated! Thanks, Karen . |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selection.End(xlDown) with Rows selected
Tokash - that's perfect. Thank you all for replying!!!
- Karen -----Original Message----- This should work: For just selecting the column "N" range would be: Range("N1", Range("N1").End(xlDown)).Select To select all the rows of the N column range: Range("N1", Range("N1").End(xlDown)).EntireRow.Select Tokash -----Original Message----- Hello - haven't been on this group in years, but I just came across a problem, and I'm not sure if the syntax has changed since older versions of Excel, but I can't make this work. I'm attempting to select row 1, make N1 the active cell, and then select down through the range (thus choosing all the rows in the range, but using column N as the active column). When I do the following code, it uses A as the active row and, ultimately, the entire range is not selected: Rows("1:1").Select Range("N1").Activate Range(Selection, Selection.End(xlDown)).Select I thought about choosing just N1, selecting the range down, and then selecting all the rows, but I can't make that work for a dynamic range (i.e. without it choosing specifically the number of rows I have in the example I'm using through the macro recorder). I'm admittedly not the most proficient programmer, but I remember I used to know how to manually adjust for this, and it either slipped my memory or that syntax has changed. Probably the former... Any help would be most appreciated! Thanks, Karen . . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Use xldown to select a range of cells | Excel Discussion (Misc queries) | |||
Color alternate rows when after hiding selected rows | Excel Worksheet Functions | |||
End(xlDown) not working? | Excel Discussion (Misc queries) | |||
How many rows have I selected ? | Excel Worksheet Functions | |||
how many rows did I selected | Excel Worksheet Functions |