Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel macro to name ranges always start in A and end in U
I need a macro that will name ranges that aren't always the same number of
rows, but always start in column A and end in column U. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel macro to name ranges always start in A and end in U
Give this a try, and let us know
Set rng = Range(Range("A1"),Cells(Rows.Count,"A").End(xlUp)) .Resize(,21) rng.Name = "range_name" -- HTH RP (remove nothere from the email address if mailing direct) "Ocicat" wrote in message ... I need a macro that will name ranges that aren't always the same number of rows, but always start in column A and end in column U. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel macro to name ranges always start in A and end in U
Ocicat:
Other means ActiveWorkbook.Names.Add Name:="range_name", RefersTo:= _ "=OFFSET($A$1,,,COUNTA($A$1:$A$65536),21)" -- 天行健,君*以自強不息 地勢坤,君*以厚德載物 http://www.vba.com.tw/plog/ "Ocicat" wrote: I need a macro that will name ranges that aren't always the same number of rows, but always start in column A and end in column U. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
GENERATE RANGES FROM GIVEN NUMBERS(START/END) AND COMPILE INTO ASINGLE LIST. | Excel Discussion (Misc queries) | |||
Moving ranges by start date | Excel Programming | |||
How to start a macro when openning Excel | Excel Programming | |||
How do I chart date ranges with varying start and finish dates? | Charts and Charting in Excel | |||
Help? start macro automatic in excel | Excel Worksheet Functions |