View Single Post
  #38   Report Post  
Posted to microsoft.public.excel.programming
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default Copy adjacent Sheet and name from a list

I'm not working on this at the moment but I have given your project
some thought for improving the various processes particular to the way
the project works.

The 1st thing I'd change is the formulas to the right of the names list
so the cells are blank if the name col is blank. This will obviate the
need to program adding the formulas and thus reduce code (and related
maintenance). The sheetname within the formula can be a ref to the
names list col...

example:
=IF(LEN(Sheetname),"'"&Sheetname&"'!G7","")

...where Sheetname is a local scope col-absolute/row-relative defined
name that refs the names list col.

Revising the formulas will simplify removing names from the list
because the formula cols to the right will auto-adjust accordingly. The
list can be resorted so names are contiguous.

Since the table is fixed size, your template can persist the formulas
AND will benefit ongoing maintenance if you include defined names for
all ranges that might be ref'd in formulas/code.

--
Garry

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