Dynamic combo box -- need to remove **duplicate values** from Offset function

I need some assistance with removing duplicate values from an OFFSET function/combo.

Please see attached XLS for details:

The dynamic dropDown (F1) is based on column B (which uses the OFFSET function below):
See Name Manager:  "=OFFSET(Sheet1!$B$1,1,0,COUNTA(Sheet1!$B:$B)-1,1)"

When entering new values (e.g., H) in column B, the combo in F1 will include the new value.

However, as of now, duplicates (e.g., "A") will be included in the drop-down list.

My question:  How can I modify the offset function/combo to **exclude** duplicate values?
Combo-Box----Automatically-Add-New-.xlsx
ExpExchHelpAsked:
Who is Participating?
 
ShumsDistinguished Expert - 2017Commented:
EEH,

I saved it with the same name, but when you click F1, A is not repeated. Check in attached...
Unique-List--DropDown-_v1.xlsx
0
 
ShumsDistinguished Expert - 2017Commented:
Hi,

Change your existing Named Range "ProductListDynamic" with below formula:
=OFFSET(Sheet1!$B$2,0,0,COUNTA(Sheet1!$B$2:$B$1000))

Open in new window

In H Column enter below Array Formula confirmed with Ctrl+Shift+Enter and drag down until you want:
=IFERROR(INDEX(ProductListDynamic,MATCH(0,COUNTIF($H$1:H1,ProductListDynamic),0)),"")

Open in new window

Create new Named Range "UniqueProductList" with below formula:
=OFFSET(Sheet1!$H$2, 0, 0, COUNT(IF(Sheet1!$H$2:$H$1000="", "", 1)), 1)

Open in new window

Now in F1 add below formula as List for drop down:
=UniqueProductList

Open in new window

Please find attached....
Combo-Box----Automatically-Add-New-.xlsx
0
 
NorieVBA ExpertCommented:
You can't alter the dynamic range to only return unique items and there's no options within Data>Validation... to do that either.

The only way I can see it possible to have the dropdown only list unique values would be to use code to populate it.

Would that be an option for you?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
ExpExchHelpAuthor Commented:
Shums - I get some errors when replicating the formulae.   When looking at the attached XLS, it looks like it's the original version I posted.  

Could you please repost the updated solution in XLS?

Thank you,
EEH
0
 
ExpExchHelpAuthor Commented:
Norie -- given that I have multiple column I need to apply this to, I would prefer staying away from VBA (in this particular case).

Thank you,
EEH
0
 
ExpExchHelpAuthor Commented:
Most excellent solution!!   Thank you... I appreciate your assistance.

EEH
0
 
ShumsDistinguished Expert - 2017Commented:
You're Welcome! Glad I was able to help.
0
 
ExpExchHelpAuthor Commented:
Shums:

I realized that my original XLS would not really work for the process.    I posted a new question with a different XLS.   Any suggestions as to how the VBA mod could be accomplished?

https://www.experts-exchange.com/questions/29073625/Combo-box-dynamic-modify-existing-VBA.html

Thanks,
EEH
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.