Cascading Combo help

PinkUnicorn

New Member
Joined
Dec 12, 2017
Messages
28
I'm looking for some help with what I think is a Cascading Combo (but I might be completely wrong!). I've tried following various different suggestions but just keep failing (likely because I don't really know what I'm doing!)

I want to provide an interactive option to help users decide which system to use for an activity.

I have put the information into a table as shown below and what I need them to be able to do is have a selection box with a drop down list of first the Category, this will then give them only the options of the file types within that category, or the file formats within that category - so first question is whether I need to have these all in one column?
Then having selected the category and file type/format they will then get a result of either DAISY, MAPS or BOTH (these being the systems they can use).

Ideally i want it to be as easy and straightforward for the user, but also that in the background I can add new file types/categories in if needed in the future.

I hope this makes some sort of sense and that someone can help me please

Files.xlsx
ABCD
1CategoryFile TypeFileFormatCapability (Result)
2Doucment/Common FileAdobe PDFPDFDAISY
3Doucment/Common FileMicrosft visioVSDXBOTH
4Doucment/Common FileMicrosoft One NoteONEDAISY
5ImageAuto CAD DrawingDWGDAISY
6Doucment/Common FileMS Office WordDOCXDAISY
7Doucment/Common FileMS Office ExcelXLSXDAISY
8Doucment/Common FileMS Office PowerpointPPTXBOTH
9Doucment/Common FileMS Office WordDOC DAISY
10Doucment/Common FileMS Office ExcelXLS BOTH
11Doucment/Common FileMS Office PowerpointPPT BOTH
12ImageGIF ImageGIFBOTH
13ImageTIFF ImageTIFFBOTH
14MappingESRI Mapping DataFREELISTMAPS
15MappingESRI Mapping DataGDBINDEXESMAPS
16MappingESRI Mapoping DataGDTABLEMAPS
17ImagePortable Network GraphicsPNGDAISY
18ImagesPhotoshopPDSDAISY
19ImagesPaintshop Pro ImagePSPDAISY
20OtherInternate Clendar SharingICALBOTH
21OLEObject LinkingOLEDAISY
Sheet1
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
What I would do:
Take your data and convert it into a table "Table1" in lets say sheet "Data":

Cascading combo help.xlsx
ABCD
1CategoryFile TypeFileFormatCapability (Result)
2Doucment/Common FileAdobe PDFPDFDAISY
3Doucment/Common FileMicrosft visioVSDXBOTH
4Doucment/Common FileMicrosoft One NoteONEDAISY
5Doucment/Common FileMS Office ExcelXLS BOTH
6Doucment/Common FileMS Office ExcelXLSXDAISY
7Doucment/Common FileMS Office PowerpointPPT BOTH
8Doucment/Common FileMS Office PowerpointPPTXBOTH
9Doucment/Common FileMS Office WordDOC DAISY
10Doucment/Common FileMS Office WordDOCXDAISY
11ImageAuto CAD DrawingDWGDAISY
12ImageGIF ImageGIFBOTH
13ImagePortable Network GraphicsPNGDAISY
14ImageTIFF ImageTIFFBOTH
15ImagesPaintshop Pro ImagePSPDAISY
16ImagesPhotoshopPDSDAISY
17MappingESRI Mapping DataGDTABLEMAPS
18MappingESRI Mapping DataFREELISTMAPS
19MappingESRI Mapping DataGDBINDEXESMAPS
20OLEObject LinkingOLEDAISY
21OtherInternate Clendar SharingICALBOTH
Data


Then create an auxiliary Sheet (which you can hide later) like this:

Cascading combo help.xlsx
ABCDEFGH
1Unique CategoriesCategoryUnique Filetype By CategoryCategoryFile TypeFileFormat
2Doucment/Common FileDoucment/Common FileAdobe PDFDoucment/Common FileAdobe PDFPDF
3ImageDoucment/Common FileMicrosft visioDoucment/Common FileMicrosft visioVSDX
4ImagesDoucment/Common FileMicrosoft One NoteDoucment/Common FileMicrosoft One NoteONE
5MappingDoucment/Common FileMS Office ExcelDoucment/Common FileMS Office ExcelXLS
6OLEDoucment/Common FileMS Office PowerpointDoucment/Common FileMS Office ExcelXLSX
7OtherDoucment/Common FileMS Office WordDoucment/Common FileMS Office PowerpointPPT
8ImageAuto CAD DrawingDoucment/Common FileMS Office PowerpointPPTX
9ImageGIF ImageDoucment/Common FileMS Office WordDOC
10ImagePortable Network GraphicsDoucment/Common FileMS Office WordDOCX
11ImageTIFF ImageImageAuto CAD DrawingDWG
12ImagesPaintshop Pro ImageImageGIF ImageGIF
13ImagesPhotoshopImagePortable Network GraphicsPNG
14MappingESRI Mapping DataImageTIFF ImageTIFF
15OLEObject LinkingImagesPaintshop Pro ImagePSP
16OtherInternate Clendar SharingImagesPhotoshopPDS
17MappingESRI Mapping DataFREELIST
18MappingESRI Mapping DataGDBINDEXES
19MappingESRI Mapping DataGDTABLE
20OLEObject LinkingOLE
21OtherInternate Clendar SharingICAL
Aux
Cell Formulas
RangeFormula
A2:A7A2=SORT(UNIQUE(Table1[Category]))
C2:D16C2=SORT(SORT(UNIQUE(Table1[[Category]:[File Type]]),2),1)
F2:H21F2=SORT(SORT(SORT(UNIQUE(Table1[[Category]:[FileFormat]]),3),2),1)
Dynamic array formulas.


Then go to your sheet where you want to have the dropdowns, in my example "Sheet1" like this:

Cascading combo help.xlsx
BCDE
1CategoryFile TypeFile FormatCapability
2Doucment/Common FileAdobe PDFPDFDAISY
3Doucment/Common FileMicrosft visioVSDXBOTH
4Doucment/Common FileMicrosoft One NoteONEDAISY
5Doucment/Common FileMS Office ExcelXLS BOTH
6Doucment/Common FileMS Office ExcelXLSXDAISY
7Doucment/Common FileMS Office PowerpointPPT BOTH
8Doucment/Common FileMS Office PowerpointPPTXBOTH
9Doucment/Common FileMS Office WordDOC DAISY
10Doucment/Common FileMS Office WordDOCXDAISY
11ImageAuto CAD DrawingDWGDAISY
12ImageGIF ImageGIFBOTH
13ImagePortable Network GraphicsPNGDAISY
14ImageTIFF ImageTIFFBOTH
15ImagesPaintshop Pro ImagePSPDAISY
16ImagesPhotoshopPDSDAISY
17MappingESRI Mapping DataFREELISTMAPS
18MappingESRI Mapping DataGDBINDEXESMAPS
19MappingESRI Mapping DataGDTABLEMAPS
20OLEObject LinkingOLEDAISY
21OtherInternate Clendar SharingICALBOTH
Sheet1
Cell Formulas
RangeFormula
E2:E21E2=IFERROR(FILTER(Table1[Capability (Result)],(Table1[Category]=Sheet1!B2)*(Table1[File Type]=Sheet1!C2)*(Table1[FileFormat]=Sheet1!D2)),"")
Cells with Data Validation
CellAllowCriteria
B2:B21List=Category
C2:C21List=FileType
D2:D21List=FileFormat


And here create the following named ranges:

First create named range "Category" like this:
Excel Formula:
=DESREF(Aux!$A$2;0;0;CONTARA(Aux!$A$2:$A$10000))

Then select the cell B2 and create a list data validation with "=Category", and as you already know will get the dropdown in B2 for Categories.

datavalidation.png


Now select cell C2 (this is important as it will have a relative reference to B2, the cell to the left) an create the named range "FileType" like this:

Excel Formula:
=DESREF(Aux!$D$1;COINCIDIR(Sheet1!A2;Aux!$C$2:$C$10000;0);;SUMA((Aux!$C$2:$C$10000=Sheet1!A2)*1))

Now still in C2 create a list data validation with "=FileType", and you will get you dropdown for filetype.

And finally select D2 (also important for the relative reference), an create the named range "FileFormat" like this:

Excel Formula:
=DESREF(Aux!$H$1;COINCIDIR(Sheet1!B2&Sheet1!C2;Aux!$F$2:$F$10000&Aux!$G$2:$G$10000;0);;SUMA((Aux!$F$2:$F$10000=Sheet1!B2)*(Aux!$G$2:$G$10000=Sheet1!C2)))

And as you guessed in D2 create the data validation with "=FileFormat".

Last use the following formula in E2:

Excel Formula:
=SI.ERROR(FILTRAR(Table1[Capability (Result)];(Table1[Category]=Sheet1!B2)*(Table1[File Type]=Sheet1!C2)*(Table1[FileFormat]=Sheet1!D2));"")

Last select the whole row and copy down.

I also upload a working book here: Cascading combo help.zip


As you add information to your table everything will update.
Keep in mind that if you change or delete data in Table1 you information in Sheet1 may have wrong entries. But dropdown should populate with the correct data.
Also keep in mind to use the dropdowns from left to right in each row, because they depend on each other in that order.

Hope this helps
 
Upvote 0
Thank you so much for the above. I think perhaps I didn't explain what I was trying to achieve by the Cascading Combo - I hoped to have one sheet which simply has Combo Boxes on it, so the user firstly goes to the Combo box for the Category and chooses Images, Mapping etc by clicking on the correct one. They then go to the second Combo box and will only get shown those options which align to that category and they choose the relevant one by clicking on that. This will then result in them being shown a result which with be either DAISY, MAPS or BOTH. It's this interactive bit that I'm struggling with - if you can advise at all that would be fantastic, thank you
 
Upvote 0
Easy fix.
In sheet "Aux" you don't need columns F:H. just delete them.
And you can delete/not create named range FileFormat
And lastly in Sheet1 delete column D which is not longer needed and replace formula in the new column D (Capability, before column E) with this in D2, and drag down:

Excel Formula:
=IFERROR(TEXTJOIN(" / ",1,UNIQUE(FILTER(Table1[Capability (Result)],(Table1[Category]=Sheet1!B2)*(Table1[File Type]=Sheet1!C2)))),"")

Now you can select in B the category, in C the FileType, and in D you get you result, which is shown like this:
DAISY
BOTH
BOTH / DAISY
MAPS

I showed all possibilities in Sheet1. If you just want this once, delete the rows from 3 onwards.

Here is the working example:

Cascading combo help (1).zip
 
Upvote 1
Having a look again i think you just want the results DAISY, MAPS or BOTH.
Use this formula in D2 and drag down:

Excel Formula:
=LET(r,IFERROR(TEXTJOIN(" / ",1,UNIQUE(FILTER(Table1[Capability (Result)],(Table1[Category]=Sheet1!B2)*(Table1[File Type]=Sheet1!C2)))),""),IF(ISNUMBER( FIND("/",r)),"BOTH",r))
 
Upvote 1
Thank you so much for the above, and I'm sorry it has taken me so long to reply - your help with this has been invaluable.

Is it possible to ask one further question please - is there any way I can create something on Sheet1 which the user can click to clear the entries so they see clear boxes? The users I am working with aren't fabulous with tech and if they were able to start with blank boxes I think it could really help them. Thank you again for your really helpful answers
 
Upvote 0
You can create a macro like so:

VBA Code:
Sub Macro2()
'
' Macro2 Macro
'

'
    Range("B2:C2").Select
    Range(Selection, Selection.End(xlDown)).Select
    Selection.ClearContents
End Sub

And asigne the macro to a Textbox or Button for example.
Here is a working example. You may have to unlock the macro book before you can use it.

Cascading combo help (2).zip
 
Upvote 1
Solution

Forum statistics

Threads
1,215,092
Messages
6,123,063
Members
449,090
Latest member
fragment

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