Ingo0123
New Member
I'm trying to design a spreadsheet that creates a dynamic table from an input page and utilizes Chandoo's drop down lists. When I run a macro to redraw the table I lose all my references to that table because its been deleted. I'm trying to figure out how I can keep my dropdown lists by either hard coding them in or forcing them static. I've gotten the MasterList to define using
But I can't get the cell referencing correct with
Everytime I run the macro the SubList refers to one cell down and over, instead of the cell directly above it. Thanks for any help.
Code:
ActiveWorkbook.Names.Add _
Name:="MasterList", _
RefersTo:="=INDEX(Table1[Operating_Unit],1):INDEX(Table1[Operating_Unit],COUNTA(Table1[Operating_Unit]))"
But I can't get the cell referencing correct with
Code:
Worksheets("Input Page").Range("b3").Select
ActiveWorkbook.Names.Add _
Name:="SubList", _
RefersTo:="=IF(OR('Input Page'!b2=""Operating_Unit"",'Input Page'!b2=""""),"""",INDEX(Table1,1,MATCH('Input Page'!b2,Table1[#Headers],0)):INDEX(Table1,COUNTA(INDEX(Table1,,MATCH('Input Page'!b2,Table1[#Headers],0))),MATCH('Input Page'!b2,Table1[#Headers],0)))"
Everytime I run the macro the SubList refers to one cell down and over, instead of the cell directly above it. Thanks for any help.