Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / February 2007

Tip: Looking for answers? Try searching our database.

Selecting a range of cells, how to ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Luc - 23 Feb 2007 19:12 GMT
Hello,

I have a problem with selecting cells.

The selection allways goes from column A to M.
The number of rows starts allways from A 11, to the LAST CELL in column A
which contains a number
So the column range is fix, and the row range is variable.

For example :
It can be A11 to M24
or A11 to M5
or A11 to M11 (this is only 1 row)

What code should i use in the macro ?

Thanxx

Luc

--------------------------------------------------------------------------------
Mijn Postvak In wordt beschermd door SPAMfighter
301 spam-mails zijn er tot op heden geblokkeerd.
Download de gratis SPAMfighter vandaag nog!
Charles Chickering - 23 Feb 2007 20:04 GMT
Luc, if the space underneath the last number in column A is always empty, try
this:
Range("A11:M" & Range("A" & Rows.Count).End(xlUp).Row)).Select

Signature

Charles Chickering

"A good example is twice the value of good advice."

> Hello,
>
[quoted text clipped - 20 lines]
> 301 spam-mails zijn er tot op heden geblokkeerd.
> Download de gratis SPAMfighter vandaag nog!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.