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
ExpExchHelpAnalystAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ShumsExcel & VBA ExpertCommented:
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
NorieAnalyst Assistant Commented:
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
ExpExchHelpAnalystAuthor 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
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

ExpExchHelpAnalystAuthor 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
ShumsExcel & VBA ExpertCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ExpExchHelpAnalystAuthor Commented:
Most excellent solution!!   Thank you... I appreciate your assistance.

EEH
0
ShumsExcel & VBA ExpertCommented:
You're Welcome! Glad I was able to help.
0
ExpExchHelpAnalystAuthor 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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Office

From novice to tech pro — start learning today.