Is there a solution for this? Thank you very much for this tutorial. The cells that contain the dropdown are not protected but the vba still doesn’t work. Also, is it possible, to have the code work on several different cells (copy and paste drop down) and have the VBA code changed to accommodate? How do I apply this to other columns and cells within the same sheet? Can you tell me how to do this? For example, if you drop down is in cell D2, then change it to D2. If I had for example entered “1” in the cell in column A prior to pressing TAB, if I then enter “2” in that same cell, the VBA code will make the data in the column A cell be: “1, 2”. Amazing! Why? Have you ever seen this? @sumitbansal23:disqus Hi Summit, your code worked great for non repetition. Also, say I have the same list in all of column 7 and 8, would I be able to have a command that tells the user that once something is selected in column 7 they can no longer select it in column 8 or vice versa? Is it possible to limit the selections to a certain number? =IF(C3=””,””,(LEN(TRIM(C3))-LEN(SUBSTITUTE(TRIM(C3),”,”,””))+1)), (You put that formula in a separate cell). Just need help on how to apply the multi drop down selection for multiple columns? SELECT ss.ID, ss.Name, s.Value FROM Sales s JOIN SalesStaff ss ON ss.ID = s.SalesID That gives you: 1 Joe 100 1 Joe 200 2 Mike 300 While it is possible to store multiple values in a single column but converting them to strings and comma separating them, it's a … Second Question, From a user experience perspective do you have a way to do this with Checkboxes so you can select all at once (either selecting or deselecting) the radio buttons for each item? I ran into a snag when I need to un-select a previously selected item from the list. Your help is amazing. Thank you for your code it helped me allot with this big project I am working on. Hi! Thank You for your post and your help. Also how to apply this to entire column (i.e from c2 till end), You can modify the code to automatically delete an entry when you select it again, but I believe it would be easier if you simply delete it manually (unless you have tens/hundreds of options selected. How about selecting multiple entries in the dropdown listbox ? I have an additional question… We have a worksheet with many picklists, and I am using this code for all multi-select picklists. Then when I try to delete some of the repeated values, it will repeat itself again in the same cell. you have to enable macros when reopening. Can you address that issue or tell me where I can find the answer? Thank you for your help. HOWEVER, whenever I type anything in any other cell, it doubles/replicates what I already had in there plus what I was typing. it worked perfectly fine,but whenever i am closing worksheet all data validation get deleted how to solve this problem. I have it working on 4 separate columns in a file I have, but there is a strange issue I’m seeing. When you apply the Filter function, after filtering one column, the next columns will be only filtered based on the result of the previous filtered column. Now I need to make one of my drop downs editable. Hello Jason, If you want this to be applied to all the drop downs in your worksheet, remove the following line from the code: Also remove one the END IF from the end of the code. I restricted the code to work in a range of cells, and I added “Please select!” in the cells to apperar when you press delete to cleare it. suming multiple product groupings as well as multiple regions . I am new to VBA, so I’m sorry for the silly question. Could you help? I copied and pasted the same way you did but it still does not work. Glad it helped . I have successfully created dropdown lists which allow for multiple selections without repetition for three columns. Hi, thanks for the great code. First question: how do I reference Worksheet X from cells in Worksheet Y – do I need to change the $C$2 in the example code to something like =X!$A1:$A5 ? Once you select options, is there a way to edit in Excel? Change the following line: If Target.Address = “$C$2” OR Target.Address = “$D$2” Then, Hi. The only thing I can think of is that it is somehow related to the code allowing for multiple selections. If I do this with this formula, it appends what ever was input first, i.e. It does that by using SELECT DISTINCT and selecting the Hours(A) value and the Hours(B) value for each column for the unique ID. hello Kevin. Im want to use multiple selection list in many sheets in one work book. I am simply trying to get multiple choices in the same cell. Regards, Soumya. Actually I just removed the error alert and I was able to add more choices to the end but it repeats the choices I made using the code. Please be kind to help Best Regards, How can you correct a mistakenly added item from the drop down menu. I cannot make it work. (rebooting, starting over, downloading the sample and adding my information there) I cannot get it to work again! Please help me. Hi Sumit, This has been extremely helpful, thank you! Where multi selection is made the filter cannot since there is no exact representative value in the data (e.g. Fingers crossed! Yes, yes I did. Thank you! use below code. Can you help me with this issue. It means that only AND criteria can be applied to more than one column. awesome post, got it workin in under 5 minutes. As exemple, “xxx” will be recognized if standing allone in the cell, but not in cells with two choices, like in “xxx, yyy” – it simply does not appear in filtered results at all. i have the same question, did you solve it already? AWESOME! I would create the drop down list and it would work fine. This is a great code and for the most part it’s worked well for me. One question – once I’ve implemented this on my spreadsheet, I may create pivot tables using the data contained therein. For example, only in g5:g53? I want c2 cell is depend b2 so that I will use indirect formula or any please suggest me. iPos = InStr(1, Oldvalue, Newvalue) If iPos = 0 Then Target.Value = Trim(Oldvalue & “, ” & Newvalue) Else: If iPos = 1 Then If Target.Value = Newvalue Then Target.Value = “” Else Tmpvalue = Newvalue & “,” Target.Value = Trim(Replace(Oldvalue, Tmpvalue, “”)) End If Else Tmpvalue = “, ” & Newvalue Target.Value = Trim(Replace(Oldvalue, Tmpvalue, “”)) End If End If. What if the drop-down item list is placed in another different worksheet? I downloaded the example file but it is not working. ' To allow multiple selections in a Drop Down List in Excel (without repetition) Any advice? When I add this VBA code it allowed multiple selection, but changed the date format from DEC-2018 to 12/01/2018. If I enter data in a cell directly in front of one of the columns I have the VBA code running against and then either tab into or right arrow into the coded column, the cell highlight will jump back to the cell I came from. How do you take the validation out so I can add text to the end of the cell, text that isn’t in the dropdown? Works fine for me with the code below. Hi Sumit. – Works. I used the code that does not allow selection of the same item but now I want to deselect but nothing happens and i can not delete the item. You’ll need to modify the code. Exactly what I wanted, thanks, keep up the good work, LIFE SAVER!!!! example selected: one, two, three …..now I need to remove three and re-select four. Hi, Were you able to find any solution for deleting/removing previously selected items? End If I am looking for a dropdown list where I can (really) multi-select. How do I apply it to C2:C42? I started with your code at the top of the thread and started making changes based on your recommendations. I just have one issue. Hi Sumit, This is really helpful but I’m not sure which “END IF” to remove. You can add the developer tab by going to File>Options>Customize Ribbon>Check Developer tab> Click OK. Is there a way to deselect something from the list if it was clicked by accident? But if I don’t want to apply the code to all the drop downs in the worksheet, only in on row? Hi. One of my colleagues asked me if it is possible to make multiple selections in a drop-down list in Excel. If i try to delete the Orange text, it doesn’t work. Select the data range that you want to filter, and then, click Kutools Plus > Super Filter, see screenshot: 2. See full code below: Private Sub Worksheet_SelectionChange(ByVal Target As Range), Dim ws As Worksheet Dim RefRng As Range, RngFind As Range, NewRng As Range, hdr Dim RefList As Range, c As Range, rngHeaders As Range, Msg, Set ws = ThisWorkbook.Worksheets(“User Picklist”), ‘only deal with the selected cell(s) Set NewRng = Application.Intersect(Me.Range(“A12:T101”), Target) If Not NewRng Is Nothing Then, For Each c In NewRng c.Validation.Delete ‘delete previous validation hdr = Me.Cells(11, c.Column).Value If Len(hdr) > 0 Then Set RngFind = rngHeaders.Find(hdr, , xlValues, xlWhole) ‘matched header? :/. I was just wondering whether this will be compatible when computing statistical analysis in Studio R; can I conduct tests on excel cells with multiple items? Dim Newvalue As String You have made my day with all of your “How To” directions on this site! Can you make multi selection drop down boxes in more than one column? Thanks. But as soon as I “format as table” the trace error appears. My other two commands are for time stamps in two different places on the same sheet. Select all columns of a table. I need to know how to apply this in multiple columns, Hi, the macro is working well but when I write in the cell and or erase it keeps the old and new value. Dat / Kens , did u got a solution to avoid multiple commas? Any ideas on how I can “save as” and retain the code and formatting? If Target.Column = 3 or Target.Column = 14 or Target.Column = 15 Then. If there is already a value in the cell and you select it again, it will not append it to the existing value. this is EXACTLY what I was looking for, thank you! Nevermind. I’ve read the comments and can’t find the same question being asked – apologize if I missed it. To check the items one by one into the long Filter list box may not be the best way for filtering. This is an excellent layout and step by step instruction. I did exactly as per your instructions. Hey Smruti, you need to paste the code for the sheet that has the drop-down list. What do I do? Any suggestions? When the sheet is protected then the ability to add more than one selection. If I specify a certain cell as the target address (can’t do column because there are other cells in the same column where I can only allow one option to be chosen), is there any way to use offset or relative references so that the target moves accordingly if, for example, I insert rows above the cell that is being referenced in the code? Have you run into this issue? Thank you Sumit for your instructions on multiple selections from an Excel drop-down menu without repetitions. Rather than have the output read “one, two, three” I would like it to read “one, two and three”. The worksheet has about 186 rows (and growing). Thanks! 'Code by Sumit Bansal from https://trumpexcel.com Hi Sumit, is there a modification to the code if I want the next selection from the dropdown in the next line. All, Is there a simple way to do a select on a table to compare any column to see if it matches a value using SQL. So i follow the above given steps again still its not working. When I use the debugger it points to: I have successfully created a multiple drop-down list without repetition – thank you. Hi Sumit. Please help. I have a column titled ‘Services’ and have created dropdown list in each cell. At first, please insert one new blank column at the left of your data, in this example, I will insert column A beside the original data. In case of multiple columns, if dropdown is not there and user manually enter the data, that data also concatenating. Quick question; I need this code to appear twice in the same sheet. I cannot get this to work, even with the file I downloaded. Appreciate your help here, thank you! Is that possible ? Hi – you need to replace H with the number of the column which in this case is 8. what might I be doing wrong?