Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Add Named Range

Hello all,
I am using the Named ranges in excel to store metadata about each cell in
excel that can persist with the excel file. So 1 cell = 1 Named
Range.Advantage of using this approach is excel automatically updates the
name references, even if we cut-and paste cells.
As per this link(http://office.microsoft.com/en-us/ex...992911033.aspx
), the amount of named ranges is limited only by the amount of available
memory.
I wrote a small macro that adds names to each cell in excel, considering an
average data of 10000 rows into 10 columns.
Like this:
Sub addNames()
Dim objRange As Range
Dim actSheet As Excel.Worksheet
For r = 1 To 10000
For c = 1 To 10
Set actSheet = Excel.ActiveSheet
Set objRange = actSheet.Cells(r, c)
Set nm = ActiveWorkbook.Names.Add("NMR" & r & "C" & c,
objRange)
Next
Next
End Sub
After 65472 cells, excel does not allow me to add more than the specified
amount of names. This is regardless of whatever RAM, whatever amount of
memory is available on user's machine.
My question is:
a. Is there a limit on number of names(named ranges) we can add to excel?
b. Is there some other property that is attached to a cell in excel that can
serve as a metadata holder, and will persist across sessions. I tried with ID
property, but it does not persist across excel session.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Add Named Range

not su

this is 2003
Names in a workbook Limited by available memory
http://office.microsoft.com/en-us/ex...CH062527721033

this is 2007
Names in a workbook Limited by available memory
http://office.microsoft.com/en-us/ex...738491033.aspx
--


Gary Keramidas
Excel 2003


"bapat" wrote in message
...
Hello all,
I am using the Named ranges in excel to store metadata about each cell in
excel that can persist with the excel file. So 1 cell = 1 Named
Range.Advantage of using this approach is excel automatically updates the
name references, even if we cut-and paste cells.
As per this link(http://office.microsoft.com/en-us/ex...992911033.aspx
), the amount of named ranges is limited only by the amount of available
memory.
I wrote a small macro that adds names to each cell in excel, considering an
average data of 10000 rows into 10 columns.
Like this:
Sub addNames()
Dim objRange As Range
Dim actSheet As Excel.Worksheet
For r = 1 To 10000
For c = 1 To 10
Set actSheet = Excel.ActiveSheet
Set objRange = actSheet.Cells(r, c)
Set nm = ActiveWorkbook.Names.Add("NMR" & r & "C" & c,
objRange)
Next
Next
End Sub
After 65472 cells, excel does not allow me to add more than the specified
amount of names. This is regardless of whatever RAM, whatever amount of
memory is available on user's machine.
My question is:
a. Is there a limit on number of names(named ranges) we can add to excel?
b. Is there some other property that is attached to a cell in excel that can
serve as a metadata holder, and will persist across sessions. I tried with ID
property, but it does not persist across excel session.


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
Referencing a named range based upon Range name entry in cell Barb Reinhardt Excel Worksheet Functions 14 June 20th 07 07:19 PM
Array as a "named range" - formula ok in cells, but error as "named range" tskogstrom Excel Discussion (Misc queries) 11 December 28th 06 04:44 PM
inserting a named range into new cells based on a named cell Peter S. Excel Discussion (Misc queries) 1 June 4th 06 03:53 AM
Compare a selected Range with a Named range and select cells that do not exist PCLIVE Excel Programming 1 October 18th 05 07:09 PM
If any cell in named range = 8 then shade named range JJ[_8_] Excel Programming 3 August 26th 05 11:09 PM


All times are GMT +1. The time now is 05:23 PM.

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"