Here is an idea for a formula solution.
If you had this data list:
Sheet1[TABLE="class: html-maker-worksheet"]
<tbody>[TR]
[TH][/TH]
[TH]C[/TH]
[/TR]
[TR]
[TH]4[/TH]
[TD="bgcolor: #002060"]Customer[/TD]
[/TR]
[TR]
[TH]5[/TH]
[TD]Joe[/TD]
[/TR]
[TR]
[TH]6[/TH]
[TD]Sioux[/TD]
[/TR]
[TR]
[TH]7[/TH]
[TD]Joe[/TD]
[/TR]
[TR]
[TH]8[/TH]
[TD]Moe[/TD]
[/TR]
[TR]
[TH]9[/TH]
[TD]Moe[/TD]
[/TR]
[TR]
[TH]10[/TH]
[TD]Chin[/TD]
[/TR]
[TR]
[TH]11[/TH]
[TD]YourName[/TD]
[/TR]
</tbody>[/TABLE]
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:
Sheet1[TABLE="class: html-maker-worksheet"]
<tbody>[TR]
[TH][/TH]
[TH]E[/TH]
[/TR]
[TR]
[TH]4[/TH]
[TD="bgcolor: #002060"]Unique Count[/TD]
[/TR]
[TR]
[TH]5[/TH]
[TD="bgcolor: #CCFFCC, align: right"]5[/TD]
[/TR]
</tbody>[/TABLE]
Cell | Formula |
---|
E5 | =SUM(IF(FREQUENCY(IF(Customers<>"",MATCH("~"&Customers,Customers&"",0)),ROW(Customers)-ROW(C5)+1),1)) |
---|
<tbody>
[TD="bgcolor: #FFFFFF"]
Array Formulas
[TABLE="class: html-maker-worksheet"]
<tbody>[TR]
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter these manually yourself[/TD]
[/TR]
</tbody>[/TABLE]
Name | Refers To |
---|
Sheet1!Customers | =Sheet1!$C$5:INDEX(Sheet1!$C$5:$C$19,COUNTA(Sheet1!$C$5:$C$19)) |
---|
<tbody>
[TD="bgcolor: #FFFFFF"]
Worksheet Defined Names
[TABLE="class: html-maker-worksheet"]
<tbody>[TR]
</tbody>
[/TD]
[/TR]
</tbody>[/TABLE]
3) Create Unique List (green cells are formulas):
Sheet1[TABLE="class: html-maker-worksheet"]
<tbody>[TR]
[TH][/TH]
[TH]E[/TH]
[/TR]
[TR]
[TH]5[/TH]
[TD="bgcolor: #002060"]Return Unique Items[/TD]
[/TR]
[TR]
[TH]7[/TH]
[TD="bgcolor: #CCFFCC"]Joe[/TD]
[/TR]
[TR]
[TH]8[/TH]
[TD="bgcolor: #CCFFCC"]Sioux[/TD]
[/TR]
[TR]
[TH]9[/TH]
[TD="bgcolor: #CCFFCC"]Moe[/TD]
[/TR]
[TR]
[TH]10[/TH]
[TD="bgcolor: #CCFFCC"]Chin[/TD]
[/TR]
[TR]
[TH]11[/TH]
[TD="bgcolor: #CCFFCC"]YourName[/TD]
[/TR]
[TR]
[TH]12[/TH]
[TD="bgcolor: #CCFFCC"].[/TD]
[/TR]
[TR]
[TH]13[/TH]
[TD="bgcolor: #CCFFCC"].[/TD]
[/TR]
</tbody>[/TABLE]
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:
Sheet1[TABLE="class: html-maker-worksheet"]
<tbody>[TR]
[TH][/TH]
[TH]A[/TH]
[TH]B[/TH]
[TH]C[/TH]
[TH]D[/TH]
[TH]E[/TH]
[TH]F[/TH]
[TH]G[/TH]
[/TR]
[TR]
[TH]4[/TH]
[TD="bgcolor: #002060"]Date[/TD]
[TD="bgcolor: #002060"]Sales[/TD]
[TD="bgcolor: #002060"]Customer[/TD]
[TD][/TD]
[TD="bgcolor: #002060"]Unique Count[/TD]
[TD][/TD]
[TD="bgcolor: #002060"]Select From Drop-down:[/TD]
[/TR]
[TR]
[TH]5[/TH]
[TD="align: right"]8/13/10[/TD]
[TD="align: right"]$50[/TD]
[TD]Joe[/TD]
[TD][/TD]
[TD="bgcolor: #CCFFCC, align: right"]5[/TD]
[TD][/TD]
[TD]Sioux[/TD]
[/TR]
[TR]
[TH]6[/TH]
[TD="align: right"]8/14/10[/TD]
[TD="align: right"]$150[/TD]
[TD]Sioux[/TD]
[TD][/TD]
[TD="bgcolor: #002060"]Return Unique Items[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TH]7[/TH]
[TD="align: right"]8/15/10[/TD]
[TD="align: right"]$211[/TD]
[TD]Joe[/TD]
[TD][/TD]
[TD="bgcolor: #CCFFCC"]Joe[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TH]8[/TH]
[TD="align: right"]8/16/10[/TD]
[TD="align: right"]$95[/TD]
[TD]Moe[/TD]
[TD][/TD]
[TD="bgcolor: #CCFFCC"]Sioux[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TH]9[/TH]
[TD="align: right"]8/17/10[/TD]
[TD="align: right"]$43[/TD]
[TD]Moe[/TD]
[TD][/TD]
[TD="bgcolor: #CCFFCC"]Moe[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TH]10[/TH]
[TD="align: right"]8/13/10[/TD]
[TD="align: right"]$22[/TD]
[TD]Chin[/TD]
[TD][/TD]
[TD="bgcolor: #CCFFCC"]Chin[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TH]11[/TH]
[TD="align: right"]8/13/10[/TD]
[TD="align: right"]$1[/TD]
[TD]YourName[/TD]
[TD][/TD]
[TD="bgcolor: #CCFFCC"]YourName[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TH]12[/TH]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TH]13[/TH]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Then if you add a name, the data would look like this and the Data Validation List would increase:
Sheet1[TABLE="class: html-maker-worksheet"]
<tbody>[TR]
[TH][/TH]
[TH]A[/TH]
[TH]B[/TH]
[TH]C[/TH]
[TH]D[/TH]
[TH]E[/TH]
[TH]F[/TH]
[TH]G[/TH]
[/TR]
[TR]
[TH]4[/TH]
[TD="bgcolor: #002060"]Date[/TD]
[TD="bgcolor: #002060"]Sales[/TD]
[TD="bgcolor: #002060"]Customer[/TD]
[TD][/TD]
[TD="bgcolor: #002060"]Unique Count[/TD]
[TD][/TD]
[TD="bgcolor: #002060"]Select From Drop-down:[/TD]
[/TR]
[TR]
[TH]5[/TH]
[TD="align: right"]8/13/10[/TD]
[TD="align: right"]$50[/TD]
[TD]Joe[/TD]
[TD][/TD]
[TD="bgcolor: #CCFFCC, align: right"]6[/TD]
[TD][/TD]
[TD]Sioux[/TD]
[/TR]
[TR]
[TH]6[/TH]
[TD="align: right"]8/14/10[/TD]
[TD="align: right"]$150[/TD]
[TD]Sioux[/TD]
[TD][/TD]
[TD="bgcolor: #002060"]Return Unique Items[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TH]7[/TH]
[TD="align: right"]8/15/10[/TD]
[TD="align: right"]$211[/TD]
[TD]Joe[/TD]
[TD][/TD]
[TD="bgcolor: #CCFFCC"]Joe[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TH]8[/TH]
[TD="align: right"]8/16/10[/TD]
[TD="align: right"]$95[/TD]
[TD]Moe[/TD]
[TD][/TD]
[TD="bgcolor: #CCFFCC"]Sioux[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TH]9[/TH]
[TD="align: right"]8/17/10[/TD]
[TD="align: right"]$43[/TD]
[TD]Moe[/TD]
[TD][/TD]
[TD="bgcolor: #CCFFCC"]Moe[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TH]10[/TH]
[TD="align: right"]8/13/10[/TD]
[TD="align: right"]$22[/TD]
[TD]Chin[/TD]
[TD][/TD]
[TD="bgcolor: #CCFFCC"]Chin[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TH]11[/TH]
[TD="align: right"]8/13/10[/TD]
[TD="align: right"]$1[/TD]
[TD]YourName[/TD]
[TD][/TD]
[TD="bgcolor: #CCFFCC"]YourName[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TH]12[/TH]
[TD="align: right"]8/14/10[/TD]
[TD="align: right"]$85[/TD]
[TD]philobr[/TD]
[TD][/TD]
[TD="bgcolor: #CCFFCC"]philobr[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TH]13[/TH]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
The data validation drop-down list would show this:
Joe
Sioux
Moe
Chin
YourName
philobr