Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Drop down select with same cell entry
Hi,
I'm using the SameCell code from http://www.contextures.com/DataValMultiSelect.zip ################################################## # Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) Dim rngDV As Range Dim oldVal As String Dim newVal As String 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 Application.EnableEvents = False newVal = Target.Value Application.Undo oldVal = Target.Value Target.Value = newVal If Target.Column = 3 Then If oldVal = "" Then 'do nothing Else If newVal = "" Then 'do nothing Else Target.Value = oldVal _ & ", " & newVal End If End If End If End If exitHandler: Application.EnableEvents = True End Sub ################################################## # I would like to have this same code extended to the next column as well. Can someone advice on how to do that?Thanks! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do I link a drop down list entry to a new drop down cell? | Excel Discussion (Misc queries) | |||
Can a user select more than one entry in a drop down list? | Excel Worksheet Functions | |||
? sort data in a drop down box w/ initial cell entry | Excel Worksheet Functions | |||
Are drop-down menus that allow 1 entry per cell possible? | Excel Discussion (Misc queries) | |||
Select a column based on a cell entry | Excel Programming |