Automatically updating dropdown menu

tyr443

New Member
Joined
Mar 4, 2016
Messages
34
Office Version
  1. 365
Platform
  1. Windows
I have a dropdown menu in multiple sheets that takes its content from another sheet with the name Courses.

Is it possible to remove options in a dropdown menu once a value is met in the "Courses" sheet, but by doing so only affect the tables after the criteria is met?

As an example, in the Sheet "Courses" there is the entry "English class" and once the number in the column next to "English class" reaches 20, I want the possiblity to select "English class" removed from the dropdown box for all subsequent sheets.

Sorry I can't provide any examples at the moment, I am currently only curious if it can be done, and how I would go about doing it.
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Hi Tye443,

Yes, you could use a constructed LoV like this:

Tyr443.xlsx
BCDEFGHIJKL
1StudentSelect CourseCoursesAttendeesConstructed LoV3
2FredLatinEnglish0English
3BertGermanFrench1French
4SueLatinLatin3German
5JimLatinGerman1 
6SallyFrench0 
70 
80 
Sheet1
Cell Formulas
RangeFormula
I2:I8I2=COUNTIF($C$2:$C$999,H2)
K2:K8K2=IFERROR(INDEX($H$2:$H$99,AGGREGATE(15,6,ROW($H$2:$H$99)-ROW($H$1)/(($I$2:$I$99<$L$1)*($H$2:$H$99<>"")),ROW()-ROW($K$1))),"")
Cells with Data Validation
CellAllowCriteria
C2:C6List=OFFSET($K$2,,,COUNTIF($K$2:$K$99,"> "))
 
Upvote 0
Hi Tye443,

Yes, you could use a constructed LoV like this:

Tyr443.xlsx
BCDEFGHIJKL
1StudentSelect CourseCoursesAttendeesConstructed LoV3
2FredLatinEnglish0English
3BertGermanFrench1French
4SueLatinLatin3German
5JimLatinGerman1 
6SallyFrench0 
70 
80 
Sheet1
Cell Formulas
RangeFormula
I2:I8I2=COUNTIF($C$2:$C$999,H2)
K2:K8K2=IFERROR(INDEX($H$2:$H$99,AGGREGATE(15,6,ROW($H$2:$H$99)-ROW($H$1)/(($I$2:$I$99<$L$1)*($H$2:$H$99<>"")),ROW()-ROW($K$1))),"")
Cells with Data Validation
CellAllowCriteria
C2:C6List=OFFSET($K$2,,,COUNTIF($K$2:$K$99,"> "))
Hi Toadstool,
Thanks for the awesome reply, it does most of what I want, however I have a question I hope you can help with, after experiementing I can't seem to find a solution.
In L1 you have the number representing the maximum number of people per course, how would I go about doing it if each course had it's own maximum number in the cell next to it?
I have tried it a few ways, but the best I get is an empty slot in my dropdown menu, which isn't great.
Thank you very much for your help so far, it has led to me learning a lot of new things in excel.
 
Upvote 0
@Toadstool nice formula but I'm asking if I would show all in column k whatever the value in column I mean if it's duplicated in column c many time then it should show in column k without duplicated but show all of them
 
Upvote 0
In L1 you have the number representing the maximum number of people per course, how would I go about doing it if each course had it's own maximum number in the cell next to it?
With a little finagling I've changed the formula.

Tyr443.xlsx
BCDEFGHIJKL
1StudentSelect CourseCoursesMax AttendeesSlots AvailableConstructed LoV
2FredFrenchEnglish20Latin
3BertEnglishFrench10German
4SueEnglishLatin32 
5JimLatinGerman43 
6SallyGerman0 
70 
2ndresp
Cell Formulas
RangeFormula
J2:J7J2=I2-COUNTIF($C$2:$C$999,H2)
L2:L7L2=IFERROR(INDEX($H$2:$H$99,AGGREGATE(15,6,ROW($H$2:$H$99)-ROW($H$1)/(($J$2:$J$99>0)*($H$2:$H$99<>"")),ROW()-ROW($L$1))),"")
Cells with Data Validation
CellAllowCriteria
C2:C6List=OFFSET($L$2,,,COUNTIF($L$2:$L$99,"> "))
 
Upvote 0
@Toadstool nice formula but I'm asking if I would show all in column k whatever the value in column I mean if it's duplicated in column c many time then it should show in column k without duplicated but show all of them
So you don't want to limit attendees? Then it doesn't need the constructed LoV, just use the Data Validation OFFSET point directly at your list of courses.

Tyr443.xlsx
BCDEFGHI
1StudentSelect CourseCoursesAttendees
2FredEnglishEnglish2
3BertFrenchFrench2
4SueEnglishLatin0
5JimFrenchGerman1
6SallyGerman0
70
Abdelfattah
Cell Formulas
RangeFormula
I2:I7I2=COUNTIF($C$2:$C$999,H2)
Cells with Data Validation
CellAllowCriteria
C2:C7List=OFFSET($H$2:$H$99,,,COUNTIF($H$2:$H$99,"> "))
 
Upvote 0
With a little finagling I've changed the formula.

Tyr443.xlsx
BCDEFGHIJKL
1StudentSelect CourseCoursesMax AttendeesSlots AvailableConstructed LoV
2FredFrenchEnglish20Latin
3BertEnglishFrench10German
4SueEnglishLatin32 
5JimLatinGerman43 
6SallyGerman0 
70 
2ndresp
Cell Formulas
RangeFormula
J2:J7J2=I2-COUNTIF($C$2:$C$999,H2)
L2:L7L2=IFERROR(INDEX($H$2:$H$99,AGGREGATE(15,6,ROW($H$2:$H$99)-ROW($H$1)/(($J$2:$J$99>0)*($H$2:$H$99<>"")),ROW()-ROW($L$1))),"")
Cells with Data Validation
CellAllowCriteria
C2:C6List=OFFSET($L$2,,,COUNTIF($L$2:$L$99,"> "))
Hey Toadstool,

Its great, does exatly what I needed. Although I have a small issue. When one of the values is "removed" and changed into the next value, I then get two of the same value, I don't know how I have managed to do that, any ideas?

So for example if the max attendees was reached for latin and it gets changed to german, for some reason I still have German in the column below.

Sorry I should say that I edited your formula.
Excel Formula:
=IFERROR(INDEX($A$2:$A$1048576,AGGREGATE(15,6,ROW($A$2:$A$1048576)-ROW($A$1)/(($S2<$E2)*(A$2:A$1048576<>"")),ROW()-ROW($X$1))),"")

where S# is the aggregate value so far, and E# is the maximum value S# can reach before being removed.
 
Upvote 0
Tyr443,

I'm not following what you're saying?
You can't change the column H entries after you've started data entry as the previous values aren't changed and the constructed LoV doesn't check for duplicates.

Changing the range to the last means you can't insert any new rows and the formula is slowed down so I'd just pick a number which is above the maximum you'd expect to enter.

I don't know what you've got in columns S, E and X.
 
Upvote 0
Tyr443,

I'm not following what you're saying?
You can't change the column H entries after you've started data entry as the previous values aren't changed and the constructed LoV doesn't check for duplicates.

Changing the range to the last means you can't insert any new rows and the formula is slowed down so I'd just pick a number which is above the maximum you'd expect to enter.

I don't know what you've got in columns S, E and X.
Test.xlsx
ABCDEFGHI
1CourseJanFebMarAprHours to dateHours requiredContructed LoV
2English33311010 
3Maths23331115English
4IT10.50.50.52.55Maths
5Business1111410IT
6Physics2222810Business
7Chemistry22241010 
8Biology55552030Chemistry
Sheet1
Cell Formulas
RangeFormula
F2:F8F2=SUM(B2:E2)
I2:I8I2=IFERROR(INDEX($A$2:$A$99,AGGREGATE(15,6,ROW($A$2:$A$99)-ROW($A$1)/(($F2<$G2)*(A$2:A$99<>"")),ROW()-ROW($I$2))),"")


The aim is that I2 onwards contain a list of the courses not yet complete, with no exmpty cells, and no doubles of remaining courses. The list would need to update as extra months are added that will increase the "Hours to date" column.

In this case the list would show only: Maths, IT, Business, Physics and Biology.

This list would then be in a dropdown menu on another sheet, and as the "hours required" are met that dropdown list would have only options for courses in which the hours required are not yet reached.

Sorry I have only just made this version as an example, I realise it would have been far easier to do this before.
 
Upvote 0

Forum statistics

Threads
1,214,560
Messages
6,120,217
Members
448,951
Latest member
jennlynn

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