
#HOW TO ADD DROP DOWN IN EXCEL CODE#
For the selected values to be shown from below, insert another code for processing.End(xlToRight).Offset(0, 1) = Target End If Target.ClearContents Application.EnableEvents = True End If End Sub Private Sub Worksheet_Change( ByVal Target As Range) On Error Resume Next If Not Intersect(Target, Range( "E2:E9")) Is Nothing And = 1 Then Application.EnableEvents = False If Len(Target.Offset(0, 1)) = 0 Then Target.Offset(0, 1) = Target Else Target. With its help, the selected values will be added to the right of the drop-down menu.
#HOW TO ADD DROP DOWN IN EXCEL HOW TO#
The way how to do this is described above. Add a ready-made macro to the sheet module.

Create a standard ComboBox using the «Data Validation» tool.Let's consider the ways of performing this task. Sometimes, you need to select several items from the drop-down list. Selecting multiple values from a drop-down list in Excel Enter the following function: =INDIRECT(А1) in the «Source:» field. If the «Trees», then «Linden», «Maple», etc. It should reflect those words that correspond to the name chosen in the first scroll. Having placed the cursor on the «Source:» field, go to the sheet and select the required cells alternately.Create the first drop-down list, which will include the names of the ranges.Remember that the name cannot contain spaces or punctuation. Above you can see how to turn a normal scroll in a named range (using the «Name Manager»). If the book with the desired values is stored in a different folder, you need to specify the path completely. The name of the file from which the information for the list is taken is enclosed in square brackets. In the «Source:» field, enter the following formula: Activate the cell where we want to put the drop-down menu.

You can solve the problem with the help of the =INDIRECT() function: it will form the correct link to an external source of information. When the values for the drop-down list are located on another sheet or in another workbook, the standard method does not work. Excel drop-down list with data from another sheet / file When you enter a new name in the empty cell of the drop-down list, the following message will appear: «Add entered name Baobab?».Ĭlick «OK» and one more row with the «Baobab» value will be added.

To do this, right-click on the name of the sheet and go to the «View Code» tab. If you do not do this, Excel will not allow you to enter new values.

Open the parameters of the «Data Validation» tool (the path is described above).
