View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
[email protected] ashwinv@gmail.com is offline
external usenet poster
 
Posts: 2
Default Programatically increase the size of all named ranges

Thanks all for your replies.

Doug - I tried your solution and it works. The first name that it picks
up is the entire worksheet itself even though there is no range defined
like that. After I skip that this the program works.

Thanks,
Ashwin

Doug Glancy wrote:
Ashwin,

This assumed that they are all worksheet level names, which is probably not
true. For workbook level names change "ActiveSheet.Names" to
"ActiveWorkbook.Names". Or run it with both if you have a mix.

hth,

Doug Glancy

"Doug Glancy" wrote in message
...
Ashwin,

Back it up before trying this:

Sub test()
Dim nam As Name
Dim new_range As Range

For Each nam In ActiveSheet.Names
'in case the name doesn't refer to a range
On Error Resume Next
nam.RefersTo = "=" &
nam.RefersToRange.Resize(nam.RefersToRange.Cells.C ount + 1250).Address
On Error GoTo 0
Next nam
End Sub

hth,

Doug

wrote in message
ups.com...
Hi,

I have about 25+ named ranges in my excel workbook. All of these ranges
currently end at row 250 and I want to increase this to 1500 for all
ranges. How do I do this programatically?

Any help is deeply appreciated.

Thanks,
Ashwin