Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Selection.End(xlDown) with Rows selected

Hello Karen.
I might be missing something, but if you 'select' 1:1,
then use 'selection' in a formula, it starts with the
cell selected (1:1) not the one activated.

The following code will hunt back from the end (or
whatever parameter you use) to the last row in a range.
Set rngZipCodes = Range(Range("a2"), Range("a65536").End
(xlUp)).

Just substitute A2 for N1 and a65536 for a row beyond the
end of the range.

Norman


-----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 did I selected Paul Ho Excel Worksheet Functions 1 November 26th 05 06:59 AM
Selection.End(xlDown) with Rows selected Tokash Excel Programming 1 August 19th 03 03:52 PM


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

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

About Us

"It's about Microsoft Excel"