dropdown list help

muppet77

Board Regular
Joined
Jan 24, 2004
Messages
223
is there a way i can have a drop down list to pick items from, that auto updates after every pick so that the new list i pick from has the previous selection omitted?

eg : choose from:
apples
bananas
courgettes
drink

select bananas

new list in next cell:
apples
courgettes
drink

ie there is NO SPACE between the omitted selection (i can get a list but it just leaves a blank space like this:

new list:
apples

courgettes
drink


any ideas?
 

Some videos you may like

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

GorD

Well-known Member
Joined
Jan 17, 2004
Messages
1,446
How many iterations of this do you need. The reason I ask is it is fairly easy to do this if it is just one, using data validation but i susoect you will want more than that.

What I mean is that your example starts with 4 items you choose 1 and your choice in your new box is for 3 items. Does it stop there or do you want a 3rd choice of the remaining 2 items. If its the latter then I can't think how to do it.

Also the data validation method, i used for the first choice would very quickly become hard to set up with too many items in your original list.

So two questions 1) How many subsequent choices and 2) How many parts on the original list?
 

muppet77

Board Regular
Joined
Jan 24, 2004
Messages
223
22 items in the list, and yes, the list gets smaller by one after each choice.

as i said i have managed it very easily, but a blank is left in the choice list.
 

Zack Barresse

MrExcel MVP
Joined
Dec 9, 2003
Messages
10,881
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile
  3. Web

ADVERTISEMENT

BRIAN!!!

i remember looking for that link when this post first showed up, but gave up exhausted. thanks!
 

Yogi Anand

MrExcel MVP
Joined
Mar 12, 2002
Messages
11,454

ADVERTISEMENT

Hi muppett77:

I had a little play with what you are trying to do. Let us have a look at ...
Book2
BCDEFGHIJ
1sourceList
2TRUEcriteriaforfiltering
3copytoforAdvancedFilter
4DropDown
5drinkMyListMyList
6apples
7bananas
8courgettes
9drink
10
Sheet8


I have used Advanced Filter to keep my list updated by excluding the item selected via the validation DropDown.

formula in cell C2 is ... =$E6<>$C$5

and I have used the following code with a Worksheet_Change event to have the AdvancedFilter execute automatically, and then to have the original list refreshed to exclude the item selected via the DropDown ...
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Intersect(Target, [C5]) Is Nothing Then Exit Sub
    With Range("E5:E" & Range("E65536").End(xlUp).Row)
        .AdvancedFilter xlFilterCopy, [C1:C2], [F5]
    End With
    [F:F].copy [E:E]
End Sub
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,201
Brian from Maui said:
Aladin,


Where did that post go, I was almost done!

I had to delete it, but see below. BTW, the OP should have stayed within the original thread...
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,201
muppet77 said:
is there a way i can have a drop down list to pick items from, that auto updates after every pick so that the new list i pick from has the previous selection omitted?...

I have no idea how what follows compares to the method the link quoted by Brian...

Problem statement. Given an alphabetized list, List0, set up a data validation cell where List0 is

the source, say cell B2 on sheet Target. Set up a second data validation cell, in B3, on Target where the alphabetized List1 is the source with the proviso that List1 must consist of List0 minus whatever is selected in B2. Set up a third data validation cell in B4, on Target where alphabetized List2 is the source with the proviso thatList2 must consist of List0 minus the selections made in B2 and B3. And so on.

ListAdmin
ShrinkingSublists.xls
ABCDEF
1Lookup
2   
31  
433 
5444
6AuditCheck12Sheet2
714List0List1List2List3
8MainListbananasapplescourgettesdrink
9bananas2applesapplescourgettesdrink
10apples1bananascourgettesdrink 
11courgettes3courgettesdrink  
12drink4drink   
13     
ListAdmin


Just as in my previous post, the source data is audited for distinctness. This bit can, if so desired, be

dropped for efficiency.

Formulas...

A7:

=--(COUNTA(A9:A12)=SUMPRODUCT((A9:A12<>"")/COUNTIF(A9:A12,A9:A12&"")))

B6:

=IF(N(A7),MATCH(REPT("z",255),A:A),"")

B7:

=IF(N(B6),B6-(CELL("Row",A9)-1),"")

B9, which is copied down:

=IF((A9<>"")*N($A$7),SUMPRODUCT((A9>OFFSET($A$9,0,0,$B$7,1))+0)+1,"")

C8, which is copied across...

=INDEX(Target!$B$2:$B$5,COLUMN()-COLUMN($C$8)+1)

This records the selections that are made on Target.

C9, which is copied down...

=IF(ROW()-ROW($C$9)+1<=$B$7,INDEX($A$9:$A$12,MATCH(ROW()-ROW($C$9)+1,$B$9:$B$12,0)),"")

Now define List0 as referring to:

=ListAdmin!$C$9:$C$12

D2,which is copied across & down to row 5...

=IF(ISNUMBER(MATCH($A9,$C$8:C$8,0)),"",VLOOKUP($A9,$A$9:$B$12,2,0))

D9, which is copied accross & down...

=IF(ROW()-ROW(D$9)+1<=COUNT(D$2:D$5),INDEX($A$9:$A$12,MATCH(SMALL(D$2:D$5,ROW()-ROW(D$9)+1),$B$9:$B$12,0)),"")

Now define:

List1 as referring to:

=ListAdmin!$D$9:INDEX(ListAdmin!$D$9:$D$12,MATCH("*",ListAdmin!$D$9:$D$12,-1))

List2 as referring to:

=ListAdmin!$E$9:INDEX(ListAdmin!$E$9:$E$12,MATCH("*",ListAdmin!$E$9:$E$12,-1))

List3 as referring to:

=ListAdmin!$F$9:INDEX(ListAdmin!$F$9:$F$12,MATCH("*",ListAdmin!$F$9:$F$12,-1))

Target

B2 ===> Allow is set to List, Source to List0.
B3 ===> Allow is set to List, Source to List1.
B4 ===> Allow is set to List, Source to List2.
B5 ===> Allow is set to List, Source to List3.
 

muppet77

Board Regular
Joined
Jan 24, 2004
Messages
223
wow thanks!

Now define:

List1 as referring to:

=ListAdmin!$D$9:INDEX(ListAdmin!$D$9:$D$12,MATCH("*",ListAdmin!$D$9:$D$12,-1))

List2 as referring to:

=ListAdmin!$E$9:INDEX(ListAdmin!$E$9:$E$12,MATCH("*",ListAdmin!$E$9:$E$12,-1))

List3 as referring to:

=ListAdmin!$F$9:INDEX(ListAdmin!$F$9:$F$12,MATCH("*",ListAdmin!$F$9:$F$12,-1))

Target

B2 ===> Allow is set to List, Source to List0.
B3 ===> Allow is set to List, Source to List1.
B4 ===> Allow is set to List, Source to List2.
B5 ===> Allow is set to List, Source to List3.

don't understand that bit. what do i have to do? have copied rest into a work sheet.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,521
Messages
5,596,652
Members
414,083
Latest member
Mrsash

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
Top