Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Working with a selected range

How do you name a selected range? How do you determine the dimensions of the range (top left corner to bottom right corner)?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Working with a selected range

Select your range and then
on the menu:
Insert - Name - Define -

Type a name and click OK.


-----Original Message-----
How do you name a selected range? How do you determine

the dimensions of the range (top left corner to bottom
right corner)?

Thanks
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Working with a selected range

I am trying to write a macro in which the user will select a range and then activate the macro. The macro will then manipulate the range. But to be able to do that I need to name the range so I can get back to it, and also define the size and location of the selected range.


"LarryN" wrote:

Select your range and then
on the menu:
Insert - Name - Define -

Type a name and click OK.


-----Original Message-----
How do you name a selected range? How do you determine

the dimensions of the range (top left corner to bottom
right corner)?

Thanks
.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Working with a selected range

Okie,

Selection.Name = "Fred"
MsgBox "First cell of Fred is " & _
Range("Fred").Cells(1).Address
MsgBox "Last cell of Fred is " & _
Range("Fred").Cells(Range("Fred").Cells.Count).Add ress
MsgBox "Fred covers " & Range("Fred").Rows.Count & " Rows"
MsgBox "Fred covers " & Range("Fred").Columns.Count & " Columns"

HTH,
Bernie
MS Excel MVP

"OkieViking" wrote in message
...
How do you name a selected range? How do you determine the dimensions of

the range (top left corner to bottom right corner)?

Thanks



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
print selected columns not working SLP Excel Discussion (Misc queries) 2 January 13th 09 02:22 PM
Setting var to selected Range El Bee Excel Discussion (Misc queries) 2 January 18th 08 09:31 PM
printing selected pages in one worksheet while working in another BROCK8292 Excel Discussion (Misc queries) 0 March 9th 07 01:38 AM
Why aren't the exceptions I selected in WS Protection working? valverax Excel Worksheet Functions 1 December 13th 05 08:16 PM
Box around selected range Tom Ogilvy Excel Programming 1 September 7th 03 04:42 PM


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