Reputation: 9
Cell E8 and E6 are dependent dropdown lists and they are working.
The range of this dependent dropdown list comes from columns K to M.
Now I want to add automatically more names do my dependent dropdown list.
Upvotes: 0
Views: 56
Reputation: 11
Private Sub Move()
Dim row, column As Integer
Dim ws As Worksheet
Set ws = ActiveSheet
'Determine Column
Select Case ws.Cells(8, 5).Value
Case "Equipment"
column = 11
Case "Tool"
column = 12
Case "Car"
column = 13
End Select
If column = 0 Then
Exit Sub
End If
'Determine row
row = ws.Cells(Rows.Count, column).End(xlUp).row + 1
'Put value in cell
ws.Cells(row, column).Value = ws.Cells(6, 5).Value
End Sub
Upvotes: 1