Can't get dynamic dropdown list to work...

DarkoDeign2

Board Regular
Joined
Jun 20, 2023
Messages
76
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have two worksheets. On the first sheet I have a dropdown list in cell C15. You can select either "Ongoing", "Sales", "Sold Out" or "Closed".
If I select "Ongoing" in C15, I want to have the data from E7:E100 to be shown in the dropdown list in cell C16.
If I select "Sales" in C15 I want to have the data from F7:F100 to be shown in the dropdown list in cell C16, and so on.

I have a formula in E7, F7, G7, H7. I suspect that this is what is causing the issue, but I am not sure.
I will also put my data sheet from where the data is pulled, just for your reference.

Book1
BCDEFGH
2Local
3
4Company name:Celestial ImportsOngoingSalesSold outClosed
5
6
77654321 4321098 
85678901
9
10
11
12
13
14
15Ongoing
16
Adress & Overview
Cell Formulas
RangeFormula
E2E2=IFERROR(INDEX(Table1[Global Local],MATCH('Adress & Overview'!$C$4,Table1[Supplier],0)),"")
E7:E8,F7:H7E7=IF($C$4="","",FILTER(Table1[Numbers],(Table1[Global Local]=$E$2)*(Table1[Supplier]=$C$4)*(Table1[Status]=E4),""))
Dynamic array formulas.
Named Ranges
NameRefers ToCells
Table7=Table1E7:H7
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E2:J2Cell Valuecontains "Local"textNO
E2:J2Cell Valuecontains "Global"textNO
Cells with Data Validation
CellAllowCriteria
C15ListOngoing; Sales; Sold out; Closed
C16List=INDIRECT(ADDRESS(C15;4;1))
C4ListCelestial Imports; Nexus Supplies; Aurora Trading Co.; Starlight Enterprises; Spectrum Suppliers; Empyrean Distributors; Quantum Merchandisers


This is my data sheet with my table of data:
Book1
CFVAG
28456234GlobalStarlight EnterprisesOngoing
39876543GlobalStarlight EnterprisesOngoing
41234567LocalSpectrum SuppliersSales
58765432LocalAurora Trading Co.Sold Out
62345678GlobalEmpyrean DistributorsClosed
77654321LocalCelestial ImportsOngoing
83456789LocalSpectrum SuppliersOngoing
96543210GlobalEmpyrean DistributorsClosed
104567890LocalNexus SuppliesOngoing
115432109GlobalStarlight EnterprisesSold Out
129876543LocalAurora Trading Co.Closed
139871234GlobalStarlight EnterprisesOngoing
148765432LocalNexus SuppliesClosed
153456789LocalAurora Trading Co.Closed
165678901LocalCelestial ImportsOngoing
174321098LocalCelestial ImportsSold Out
182109876GlobalQuantum MerchandisersOngoing
196543210LocalNexus SuppliesSales
Tracking
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Hi ... are you willing to create another sheet with some list information on/in it?
I do not think your formulas are an issue.
Try the Data Validation Formulas and let me know if they work for you.

On my "Lists" sheet I have the following.
DynamicDataValidationLists.xlsm
ABCD
14OngoingSalesSold outClosed
15E7:E1000F7:F1000G7:G1000H7:H1000
Lists


then for Data Validation formulas I have these for both C15 and C16. It seem to work with a Quick Test.
DynamicDataValidationLists.xlsm
BCD
15Sold out
16345678
17
Sheet2
Cells with Data Validation
CellAllowCriteria
C15List=$E$4:$H$4
C16List=INDIRECT(INDEX(Lists!$A$15:$D$15,MATCH(C15,Lists!$A$14:$D$14,0)))
 
Upvote 1
Hi,

I would like to do this if possible without having to create a new sheet.
However when I tried your example I get an error. When I do the data validation for cell c16 and try to close the popup window, I get, "The source currently evaluaes to an error, do you want to continue?".

Correction: when I removed the $signs, I don't get an error message, but instead the drop down list in cell C16 shows the formula for the data validation.
1691737626292.png
 
Last edited:
Upvote 0
I would like to do this if possible without having to create a new sheet.
No need for a new sheet & no need for the volatile function INDIRECT. Use the Data Validation for C16 as shown below.

Also,
  • it is a bad idea to use the sheet name of the sheet that the formula is on. It is not needed & can in fact lead to incorrect results in some circumstances. See my changed formula in E2
  • in the future, when posting a formal table, please include the header row

DarkoDeign2.xlsm
BCDEFGH
1
2Local
3
4Company name:Celestial ImportsOngoingSalesSold outClosed
5
6
77654321 4321098 
85678901
9
10
11
12
13
14
15Sold out
16
Address & Overview
Cell Formulas
RangeFormula
E2E2=IFERROR(INDEX(Table1[Global Local],MATCH($C$4,Table1[Supplier],0)),"")
E7:E8,F7:H7E7=IF($C$4="","",FILTER(Table1[Numbers],(Table1[Global Local]=$E$2)*(Table1[Supplier]=$C$4)*(Table1[Status]=E4),""))
Dynamic array formulas.
Cells with Data Validation
CellAllowCriteria
C15List=$E$4:$H$4
C16List=INDEX($E$7:$H$7,MATCH(C15,$E$4:$H$4,0))#


Examples

1691750975906.png


1691750927239.png
 
Last edited:
Upvote 1
This works perfect, thanks! I also removed the name of the worksheet in the formulas.
I came to think of it while playing around.

If I select "Celstial imports" in cell C4.
Is it possible to show "Ongoing" and "Sold out" in C15 drop down list? In other words, just to show the ones that has values below.
So in your example above Sales and Closed doesn't have any values so these are not shown in the drop down list?

I just came to think of this, if it is even possible...
 
Upvote 0
This works perfect, thanks!
You're welcome.

Is it possible to show "Ongoing" and "Sold out" in C15 drop down list? In other words, just to show the ones that has values below.
Add a new formula (I have used cell J4)
And change the C15 DV as follows.

DarkoDeign2.xlsm
BCDEFGHIJKL
2Local
3
4Company name:Celestial ImportsOngoingSalesSold outClosedOngoingSold out
5
6
77654321 4321098 
85678901
9
14
15Ongoing
16
Address & Overview
Cell Formulas
RangeFormula
E2E2=IFERROR(INDEX(Table1[Global Local],MATCH($C$4,Table1[Supplier],0)),"")
J4:K4J4=FILTER(E4:H4,E7:H7<>"")
E7:E8,F7:H7E7=IF($C$4="","",FILTER(Table1[Numbers],(Table1[Global Local]=$E$2)*(Table1[Supplier]=$C$4)*(Table1[Status]=E4),""))
Dynamic array formulas.
Cells with Data Validation
CellAllowCriteria
C15List=$J$4#
C16List=INDEX($E$7:$H$7,MATCH(C15,$E$4:$H$4,0))#


Example:

1691753546117.png
 
Upvote 1
Solution
You are welcome. Glad it worked for you. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,215,635
Messages
6,125,942
Members
449,275
Latest member
jacob_mcbride

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