Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Luc Luc is offline
external usenet poster
 
Posts: 23
Default Selecting a range of cells , how to ?

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!


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Selecting a range of cells , how to ?

Sub ordinate()
n = Cells(Rows.Count, "A").End(xlUp).Row
Set r = Range(Cells(11, "A"), Cells(n, "M"))
r.Select
End Sub

--
Gary''s Student
gsnu200707


"Luc" wrote:

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!



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
Selecting a range of cells, how to ? Luc Excel Worksheet Functions 2 February 23rd 07 07:17 PM
Range selecting cells Alec H Excel Discussion (Misc queries) 2 March 14th 06 01:36 PM
Selecting a Range Of Cells. Neil Excel Programming 1 February 24th 05 11:54 AM
Help with selecting a range of cells Mick[_3_] Excel Programming 0 January 12th 05 09:41 AM
Selecting a range of cells Kevin Excel Programming 5 October 10th 03 03:03 PM


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