drop list with check box

Brass Contributor

Hi All

 

I have a column in an Excel page that has a drop-down list, but the problem is that the options may be more than one. Can I merge the check box with the drop-down list, so that more than one option is selected at the same time, or does it not work in this way?

 

 

14 Replies

@peiyezhu 

 

I have included a file with an example of exactly what I want

@Saud 

See the attached version. It is now a macro-enabled workbook, so you will have to allow macros when you open the workbook.

To view the code, right-click the sheet tab and select 'View Code' from the context menu.

@HansVogelaar It didn't work. What I want is the exact same attachment

@Saud 

It does work, but it is not what you wanted.

See How to create drop down list with multiple checkboxes in Excel? 

@HansVogelaar 

 

I think it didn't work because excel stopped macro functions
You're right, that's not what I want. I attached a file by mistake, see the correct attachment. The problem is that it needs an external source. It must be downloaded. Can we do the same thing without that?

@Saud 

KuTools is a commercial product, but the article in my previous reply explains how you can simulate a combo box with check boxes by using a list box. It does not require downloading anything (but it works on Windows only, not on Mac)

@HansVogelaar 

 

The problem is that I will be sharing the file with a number of interested people via Google Sheet in order to have a live update of the file. If I download Kutools, will it work correctly, or will there be errors?

@Saud 

KuTools will not work on Google Sheets, nor will the method using an ActiveX list box. That works only in the desktop version of Excel for Windows.

I have no experience with Google Sheets, so I have no idea if what you want is possible there.

if you want an online form,I am afraid excel is not the best choice for customize input.
A dynamic web page looks better solution.

You're right it doesn't work, the problem lies in the complexity of the macro, I tried it and it on gogle sheet but didn't work until I tried it on Excel online and it didn't work but what is the best option to apply it to Excel with out macro,After all the experiments I'm going to empty the dropdown list with separate columns and cancel the drop down list except If there is a solution

@HansVogelaar Piggy-backing off this; hope no one minds.

 

This is great and works beautifully, but I have a question: what if I wanted two different lists to work like this. For instance, range C2:C101 would have the data validation range H2:H10 and range D2:D101 would have the data validation range I2:I15. 

 

So, someone would select option(s) from the drop-down list in C3, and I'd like for them to have the ability to select more than one option from the range of H2:H10. Same thing with the drop-down list in D4. 

 

VBA is not my strong suit, unfortunately. I'm much more proficient in JS, which at least gives me the base to understand what's happening in the code you provided, but not enough to expound upon it. I'd love a little help, if you wouldn't mind!

 

Thanks!

@MKell099 

The only thing you need to change in the code is the range to be checked:

 

If Intersect(Range("C2:D101"), Target) Is Nothing Then Exit Sub

 

See the attached version.