Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Excel macro to name ranges.

I need an Excel macro to name ranges. The ranges always start in column A
and end in column U. The problem is that the ranges aren't the same number
of rows. The names are based on numbers such as _1, _2 etc. They often are
more than 900 ranges.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excel macro to name ranges.

To give A1:U2 the name Name_1

Range("A1").Resize(2,21).Name = "Name_1"

You have given no information on determining how many rows a range might
have or how the name would be determined.

--
Regards,
Tom Ogilvy

"Ocicat" wrote in message
...
I need an Excel macro to name ranges. The ranges always start in column A
and end in column U. The problem is that the ranges aren't the same

number
of rows. The names are based on numbers such as _1, _2 etc. They often

are
more than 900 ranges.



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
Excel Macro to Email specified ranges Susan Excel Discussion (Misc queries) 1 June 30th 08 03:51 PM
Relative Ranges in excel macro edself Excel Discussion (Misc queries) 6 October 13th 05 02:02 PM
Relative Ranges in excel macro edself Excel Worksheet Functions 6 October 13th 05 02:02 PM
vba excel macro question...ranges zoola Excel Worksheet Functions 3 July 6th 05 08:56 PM
I need an excel macro to name ranges Ocicat Excel Programming 2 November 18th 04 09:31 PM


All times are GMT +1. The time now is 09:07 PM.

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"