View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default stoping duplication in drop down list

John Walkenbach shows how:
http://j-walk.com/ss/excel/tips/tip47.htm

It's actually for a listbox, but you'll see how he does it.

mantrid wrote:

Hello
Im using a simple loop to check part od a column an add thecontents of its
cells to a dropdown list. The code is below

rowno = 9
Do Until IsEmpty(ActiveSheet.Cells(rowno, 2).Value)
Me.cmbHolding.AddItem ActiveSheet.Cells(rowno, 2).Value
rowno = rowno + 1
Loop

Problem is the items from the column can occur more than one, but I would
like to include them in the dropdown list only once. Is there a commonly
used solution for this as I imagine it is a common problem.

Thanks
Ian


--

Dave Peterson