Hi excel experts!
I have been using this contextures page with this.
The macro I am using currently allows the user to select multiple things from a drop down list, and currently the selections appear in the rows of the column next to cell containing the drop down list.
So if the drop down list was in A1 the selections would appear in B1,B2,B3,B4,B5 etc etc.
I am complete newbie when it comes to VBA- but would like the current macro I have to have the selection to start from a few rows bellow the drop down list but in the SAME column- so A4,A5,A5 etc
The current code is:
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo exitHandler
Dim rngDV As Range
Dim lRow As Long
Dim lCol As Long
lCol = Target.Column 'column with data validation cell
If Target.Count > 1 Then GoTo exitHandler
On Error Resume Next
Set rngDV = Cells.SpecialCells(xlCellTypeAllValidation)
On Error GoTo exitHandler
If rngDV Is Nothing Then GoTo exitHandler
If Intersect(Target, rngDV) Is Nothing Then
'do nothing
Else
If Target.Value = "" Then GoTo exitHandler
Application.EnableEvents = False
Select Case Target.Column
Case 16
If Target.Offset(0, 1).Value = "" Then
lRow = Target.Row
Else
lRow = Cells(Rows.Count, lCol + 1).End(xlUp).Row + 1
End If
Cells(lRow, lCol + 1).Value = Target.Value
Target.ClearContents
End Select
End If
exitHandler:
Application.EnableEvents = True
End Sub
Any ideas (?)...thanks in advance...
Bookmarks