Combo box without duplicates

ApesMM273

New Member
Joined
Dec 9, 2003
Messages
40
I have a combo box, which is populated (I used the wizard) to the "Branch" column of a query. However, each "branch" can be listed multiple times, and I want it to only list each branch once. How do I get rid of duplicate values?
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Go to the Combo's Properties. Select Row Source. Click on the three dots. This will bring up the Query Builder. Click on the Sigma sign in the Toolbar (the button that looks like an 'E'). This will make your query a Group By query, which will return only Distinct Values (i.e. no matter how many times the same data appears in the table, it will appear in the combo box only once).
 
Upvote 0
Another option;
Also in the underlying query for the combo box, select the SQL view.
You'll see
SELECT something
FROM somewhere;

Change this to
SELECT DISTINCT something
FROM somewhere;

That will keep you to single values as well

Denis
 
Upvote 0

Forum statistics

Threads
1,221,596
Messages
6,160,719
Members
451,666
Latest member
GCS1998

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top