LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I link a drop down list entry to a new drop down cell? lmunzen Excel Discussion (Misc queries) 1 August 15th 06 04:59 PM
Can a user select more than one entry in a drop down list? Brendan Excel Worksheet Functions 1 July 6th 06 04:40 AM
? sort data in a drop down box w/ initial cell entry Leef Excel Worksheet Functions 1 June 3rd 06 01:56 AM
Are drop-down menus that allow 1 entry per cell possible? creativeops Excel Discussion (Misc queries) 2 February 9th 06 07:57 AM
Select a column based on a cell entry [email protected] Excel Programming 2 September 29th 05 12:41 PM


All times are GMT +1. The time now is 07:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"