
With its help, the selected values will be added to the right of the drop-down menu.
#Youtube date 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. Save it, setting the «Excel Macro-Enabled Workbook» file type.Private Sub Worksheet_Change( ByVal Target As Range) Dim lReply As Long If > 1 Then Exit Sub If Target.Address = "$C$2" Then If IsEmpty(Target) Then Exit Sub If WorksheetFunction.CountIf(Range( "trees"), Target) = 0 Then lReply = MsgBox( "Add entered name " & _ Target & " in the drop-down list?", vbYesNo + vbQuestion) If lReply = vbYes Then Range( "trees").Cells(Range( "trees").Rows.Count + 1, 1) = Target End If End If End If End Sub
#Youtube date drop down in excel code#
Copy the code (just insert your parameters). Alternatively, press Alt + F11 simultaneously. 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.



If changes are made to the available range (data are added or deleted), they are automatically reflected in the drop-down list. It is necessary to make a drop-down list with values from the dynamic range.
