Data Validation and Windows User defined named dynamic ranges

Xtrimmer

New Member
Joined
Apr 28, 2011
Messages
33
Hello experts! I have a small problem that maybe one of you knowledgeable people might be able to help me with.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p></o:p>
Let us assume that the current user logged in to Windows is jtrimmer. What it is that I am trying to accomplish is use data validation to call a named, formula-defined, dynamic range specific to the windows user that is logged on. I have the various list names formatted as username.list. Since the list length changes all the time, the list named "jtrimmer.list" (I assume) must be defined by a formula.
I used =OFFSET(Sheet3!$A$1,1,0,COUNTA(Sheet3!$A:$A)-1,1). <o:p></o:p>
<o:p></o:p>
<o:p></o:p>
<o:p></o:p>
The worksheet must know which user is currently active to select the correct list so the following was written:<o:p></o:p>
Rich (BB code):
Function UserNameWindows() As String<o:p></o:p>
UserNameWindows = Environ("USERNAME")<o:p></o:p>
End Function<o:p></o:p>
<o:p></o:p>
Now I have the username "jtrimmer" in cell Z1 called by the defined function =UserNameWindows()<o:p></o:p>
Now that I have the lists and user defined I want to use Data Validation to allow the appropriate list with the source =INDIRECT($Z$1&”.list”) but this is not working and I do not know why.<o:p></o:p>
<o:p></o:p>
This works fine if I use the name manager to define the list as static with the formula =Sheet3!$A$2:$A$4 and/or it works fine if I hardcode the data validation source with =jtrimmer.list but for this application the list must be dynamic and change when the user changes.<o:p></o:p>
<o:p></o:p>
Here is a sample of my worksheet lists:
Excel Workbook
ABC
1jtrimmer.Listbjones.Listjdoe.List
2x-23x-23x-34
3x-34c-23x-45
4x-45x-21c-7
5x-43y-12
6c-54
Sheet3
Excel 2007


<o:p></o:p>
Does anyone know what I am doing wrong here? Or is this just a limitation to Excel's built in Data validation?<o:p></o:p><o:p></o:p>
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Is this impossible to accomplish or am I not explaining the situation well enough? It seems like any named range works fine except the formula defined named ranges and a formula is the only way I can think of to make a named range dynamic in size . Any ideas?
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,774
Members
452,353
Latest member
strainu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top