ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   range naming and conditional creation (https://www.excelbanter.com/excel-programming/448874-range-naming-conditional-creation.html)

CellShocked

range naming and conditional creation
 
Hey guys n gals,

I use a lot of named ranges for cells and cell arrays.

I find it particularly archaic that each entry has to be done in a
singular, one at a time fashion. Same thing for validations and
conditionals.

There should be way to do this in a table. Maybe there is, but it
should be part of the base engine, IMO.

So, are there specific programming command which allow for range name
creation or validation or conditionals to be added, edited or removed?

If so, I think I should be able to create a worksheet which has the
data elements and write a script which performs the insertions, edits,
and deletes.

Does this sound feasible? Or is it already going on/code snips around?

Any help would be greatly appreciated.

witek

range naming and conditional creation
 
CellShocked wrote:
Hey guys n gals,

I use a lot of named ranges for cells and cell arrays.

I find it particularly archaic that each entry has to be done in a
singular, one at a time fashion. Same thing for validations and
conditionals.

There should be way to do this in a table. Maybe there is, but it
should be part of the base engine, IMO.

So, are there specific programming command which allow for range name
creation or validation or conditionals to be added, edited or removed?

If so, I think I should be able to create a worksheet which has the
data elements and write a script which performs the insertions, edits,
and deletes.

Does this sound feasible? Or is it already going on/code snips around?

Any help would be greatly appreciated.



check

Application.Names.Add



CellShocked

range naming and conditional creation
 
On Wed, 12 Jun 2013 20:11:07 -0500, witek
wrote:

CellShocked wrote:
Hey guys n gals,

I use a lot of named ranges for cells and cell arrays.

I find it particularly archaic that each entry has to be done in a
singular, one at a time fashion. Same thing for validations and
conditionals.

There should be way to do this in a table. Maybe there is, but it
should be part of the base engine, IMO.

So, are there specific programming command which allow for range name
creation or validation or conditionals to be added, edited or removed?

If so, I think I should be able to create a worksheet which has the
data elements and write a script which performs the insertions, edits,
and deletes.

Does this sound feasible? Or is it already going on/code snips around?

Any help would be greatly appreciated.



check

Application.Names.Add



This is a prompt to browse the code reference?

GS[_2_]

range naming and conditional creation
 
Given the custom nature of the names feature, I'd be surprised if MS
provides much more than what we got with V12. I use JKP's NameManager
addin extensively and find it the best thing going for this.

As for what I think you're looking for...

I use VBA to setup local names based on a 'setup table' stored on a
hidden worksheet. This is described in the book entitled *Professional
Excel Development* in some detail. I use this to toggle the worksheet
UI settings between devmode and runmode mostly, but it serves to
populate sheets with defined names and set there runtime values at
design time as well.

The table basically lists sheet CodeNames in colA and the desired
DefinedNames as its headings.

The code cycles through the table checking each sheet for the existence
of the name, adds it if need be, and sets its value to what's stored in
the table.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion



CellShocked

range naming and conditional creation
 
On Wed, 12 Jun 2013 23:22:53 -0400, GS wrote:

Given the custom nature of the names feature, I'd be surprised if MS
provides much more than what we got with V12. I use JKP's NameManager
addin extensively and find it the best thing going for this.

As for what I think you're looking for...

I use VBA to setup local names based on a 'setup table' stored on a
hidden worksheet. This is described in the book entitled *Professional
Excel Development* in some detail. I use this to toggle the worksheet
UI settings between devmode and runmode mostly, but it serves to
populate sheets with defined names and set there runtime values at
design time as well.

The table basically lists sheet CodeNames in colA and the desired
DefinedNames as its headings.

The code cycles through the table checking each sheet for the existence
of the name, adds it if need be, and sets its value to what's stored in
the table.


Cool. Thanks. So it appears a recursive creation tool can be coded
rather easily. Thanks again.


All times are GMT +1. The time now is 03:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com