Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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
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
Use xldown to select a range of cells merry_fay Excel Discussion (Misc queries) 3 May 26th 09 05:54 PM
Color alternate rows when after hiding selected rows Monk[_2_] Excel Worksheet Functions 6 June 7th 08 01:36 AM
End(xlDown) not working? RAHokie Excel Discussion (Misc queries) 2 January 19th 07 12:40 AM
How many rows have I selected ? Paul Ho Excel Worksheet Functions 6 November 26th 05 02:43 PM
how many rows did I selected Paul Ho Excel Worksheet Functions 1 November 26th 05 06:59 AM


All times are GMT +1. The time now is 02:39 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"