Here is an idea for a formula solution.
If you had this data list:
Excel Workbook |
---|
|
---|
| C |
---|
4 | Customer |
---|
5 | Joe |
---|
6 | Sioux |
---|
7 | Joe |
---|
8 | Moe |
---|
9 | Moe |
---|
10 | Chin |
---|
11 | YourName |
---|
|
---|
And you wanted the data validation drop-down list to show this:
Joe
Sioux
Moe
Chin
YourName
And you wanted the list and the data validation drop-down to be dynamic (can add or subtract values) try this:
1) Create Defined Name (Ctrl + F3 to get to Name Manager):
"Customers":
=Sheet1!$C$5:INDEX(Sheet1!$C$5:$C$19,COUNTA(Sheet1!$C$5:$C$19))
The range Sheet1!$C$5:$C$19 should go down beyond the final row that you would have data.
2) Create this formula:
Excel Workbook |
---|
|
---|
| E |
---|
4 | Unique Count |
---|
5 | 5 |
---|
|
---|
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Excel Workbook |
---|
|
---|
Name | Refers To |
---|
Sheet1!Customers | =Sheet1!$C$5:INDEX(Sheet1!$C$5:$C$19,COUNTA(Sheet1!$C$5:$C$19)) |
---|
|
---|
3) Create Unique List (green cells are formulas):
Excel Workbook |
---|
|
---|
| E |
---|
5 | Return Unique Items |
---|
7 | Joe |
---|
8 | Sioux |
---|
9 | Moe |
---|
10 | Chin |
---|
11 | YourName |
---|
12 | . |
---|
13 | . |
---|
|
---|
In cell E7 enter this formula with Ctrl + Shift + Enter, and then copy down as far as needed to accommodate unique values:
=IF(ROWS(E$7:E7)>$E$5,"",INDEX(Customers,SMALL(IF(FREQUENCY(IF(Customers<>"",MATCH(Customers,Customers&"",0)),ROW(Customers)-ROW($C$5)+1),ROW(Customers)-ROW($C$5)+1),ROWS(E$7:E7))))
4) Create Defined Name (Ctrl + F3 to get to Name Manager):
"DVDynamicRange":
=Sheet1!$E$7:INDEX(Sheet1!$E$7:$E$13,Sheet1!$E$5)
The range Sheet1!$E$7:$E$13 should go down beyond the final row that you would have unique data.
5) Create Data Validation Drop-down List (Alt + D + L, Allow = List, Source = Defined Name = DVDynamicRange)
The whole thing might look like this:
Excel Workbook |
---|
|
---|
| A | B | C | D | E | F | G |
---|
4 | Date | Sales | Customer | | Unique Count | | Select From Drop-down: |
---|
5 | 8/13/10 | $50 | Joe | | 5 | | Sioux |
---|
6 | 8/14/10 | $150 | Sioux | | Return Unique Items | | |
---|
7 | 8/15/10 | $211 | Joe | | Joe | | |
---|
8 | 8/16/10 | $95 | Moe | | Sioux | | |
---|
9 | 8/17/10 | $43 | Moe | | Moe | | |
---|
10 | 8/13/10 | $22 | Chin | | Chin | | |
---|
11 | 8/13/10 | $1 | YourName | | YourName | | |
---|
12 | | | | | | | |
---|
13 | | | | | | | |
---|
|
---|
Then if you add a name, the data would look like this and the Data Validation List would increase:
Excel Workbook |
---|
|
---|
| A | B | C | D | E | F | G |
---|
4 | Date | Sales | Customer | | Unique Count | | Select From Drop-down: |
---|
5 | 8/13/10 | $50 | Joe | | 6 | | Sioux |
---|
6 | 8/14/10 | $150 | Sioux | | Return Unique Items | | |
---|
7 | 8/15/10 | $211 | Joe | | Joe | | |
---|
8 | 8/16/10 | $95 | Moe | | Sioux | | |
---|
9 | 8/17/10 | $43 | Moe | | Moe | | |
---|
10 | 8/13/10 | $22 | Chin | | Chin | | |
---|
11 | 8/13/10 | $1 | YourName | | YourName | | |
---|
12 | 8/14/10 | $85 | philobr | | philobr | | |
---|
13 | | | | | | | |
---|
|
---|
The data validation drop-down list would show this:
Joe
Sioux
Moe
Chin
YourName
philobr