#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Validation List

Is there a way to create a dynamic list for use with data validation? For
example: if I have a list of 10 players. In A1, the list will display all
players in the list. However, B1 will show only 9 players from the list
(original 10 minus the one selected in A1).

Thank you.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Validation List

See this:

http://contextures.com/xlDataVal03.html

--
Biff
Microsoft Excel MVP


"ghopper01" wrote in message
...
Is there a way to create a dynamic list for use with data validation? For
example: if I have a list of 10 players. In A1, the list will display all
players in the list. However, B1 will show only 9 players from the list
(original 10 minus the one selected in A1).

Thank you.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default Validation List

You asked for it, you got it :), and this is NON-VBA solution. There may be
better solutions out there....but I made this one a while back, and it works
for me....that being said, I will give you the essentials.
First, create a separate tab, this will be your list, my example, the tab is
named Data. This tab is strictly for the list that you will be using for DV
on your main tab which in my example is called Main.
First, I need to define some ranges, name, Names, Names2, Names 3. Go to
Insert|Name|Define to define as follows:
Names: =Data!$A$2:INDEX(Data!$A$2:$A$100,COUNTA(Data!$A$2 :$A$100))
Names2: =Data!$C$2:INDEX(Data!$C$2:$C$100,COUNTA(Data!$C$2 :$C$100))
Names3:
=OFFSET(Data!$E$2,0,0,COUNTA(Data!$E$2:$E$100)-COUNTBLANK(Data!$E$2:$E$100),1)
On Data tab, I still have row 1 empty, and starting in A2, going down, I
type my full actual list of people.
In cell B2: =IF(ROW()=2,2,B1+1)
In cell C2: =IF(COUNTIF(Main!$A$1:$Z$1,A2)=1,"",A2)
In cell D2(array formula, commit formula by pressing CTRL+ALT+ENTER after
typing):
=IF(SUMPRODUCT(--($A$2:$A$100=$C$2:$C$100))<ROW()-1,"",SMALL(IF(Names=Names2,ROW($C$2:$C$100)),ROW(1 :$100)))
In cell E2: =IF(D2="","",VLOOKUP(D2,$B$2:$C$100,2,FALSE))

Go to your main tab, go to cell A1, menu Data|Validation
Allow: List, Source: =Names3
Copy to the right across row 1.

Currently, I have it set up to cover up to 26 columns across the top of row
1 on the Main tab, you can have more, but be sure to expand the formula in
cell C2 on your Data tab (and of course be sure to copy the validation over).
I have it set up to get up to row 100 on the Data tab with individual names,
but if you need more, be sure to expand the formula ranges above that go
through $100.

Hope this helps, and if it does, be sure to check it!

--
John C


"ghopper01" wrote:

Is there a way to create a dynamic list for use with data validation? For
example: if I have a list of 10 players. In A1, the list will display all
players in the list. However, B1 will show only 9 players from the list
(original 10 minus the one selected in A1).

Thank you.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default Validation List

Forgot to mention, copy cells B2 through E2 down to row 100 on the Data tab,
or further as needed.
--
John C


"John C" wrote:

You asked for it, you got it :), and this is NON-VBA solution. There may be
better solutions out there....but I made this one a while back, and it works
for me....that being said, I will give you the essentials.
First, create a separate tab, this will be your list, my example, the tab is
named Data. This tab is strictly for the list that you will be using for DV
on your main tab which in my example is called Main.
First, I need to define some ranges, name, Names, Names2, Names 3. Go to
Insert|Name|Define to define as follows:
Names: =Data!$A$2:INDEX(Data!$A$2:$A$100,COUNTA(Data!$A$2 :$A$100))
Names2: =Data!$C$2:INDEX(Data!$C$2:$C$100,COUNTA(Data!$C$2 :$C$100))
Names3:
=OFFSET(Data!$E$2,0,0,COUNTA(Data!$E$2:$E$100)-COUNTBLANK(Data!$E$2:$E$100),1)
On Data tab, I still have row 1 empty, and starting in A2, going down, I
type my full actual list of people.
In cell B2: =IF(ROW()=2,2,B1+1)
In cell C2: =IF(COUNTIF(Main!$A$1:$Z$1,A2)=1,"",A2)
In cell D2(array formula, commit formula by pressing CTRL+ALT+ENTER after
typing):
=IF(SUMPRODUCT(--($A$2:$A$100=$C$2:$C$100))<ROW()-1,"",SMALL(IF(Names=Names2,ROW($C$2:$C$100)),ROW(1 :$100)))
In cell E2: =IF(D2="","",VLOOKUP(D2,$B$2:$C$100,2,FALSE))

Go to your main tab, go to cell A1, menu Data|Validation
Allow: List, Source: =Names3
Copy to the right across row 1.

Currently, I have it set up to cover up to 26 columns across the top of row
1 on the Main tab, you can have more, but be sure to expand the formula in
cell C2 on your Data tab (and of course be sure to copy the validation over).
I have it set up to get up to row 100 on the Data tab with individual names,
but if you need more, be sure to expand the formula ranges above that go
through $100.

Hope this helps, and if it does, be sure to check it!

--
John C


"ghopper01" wrote:

Is there a way to create a dynamic list for use with data validation? For
example: if I have a list of 10 players. In A1, the list will display all
players in the list. However, B1 will show only 9 players from the list
(original 10 minus the one selected in A1).

Thank you.

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
data validation invalid in dynamic validation list ilia Excel Discussion (Misc queries) 0 November 7th 06 12:54 PM
data validation invalid in dynamic validation list ilia Excel Worksheet Functions 0 November 7th 06 12:54 PM
Data Validation - List - keeping the format of the list - shading aasbury Excel Discussion (Misc queries) 1 June 5th 06 04:25 PM
Remove empty cells from named list / validation list Sp00k Excel Worksheet Functions 4 April 28th 06 03:45 PM
validation list--list depends on the selection of first list Michael New Users to Excel 2 April 27th 06 10:23 PM


All times are GMT +1. The time now is 04:13 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"