PC Review


Reply
Thread Tools Rate Thread

Can you make it so you choose more than one item from a drop down

 
 
=?Utf-8?B?TFRheWxvcg==?=
Guest
Posts: n/a
 
      13th Jul 2007
I have copied the code which makes it possible to choose more than one item
from a dropdown list in excel. Something I’m not clear on is, once the code
is copied to the worksheet is that ability to pick more than one variable
from a list valid for every column in the worksheet of just one column? I
copied the code and it is only working for the column which was highlighted
when I pasted the code. I need this to work for all my dropdown list within
a single worksheet. Any help is so appreciated!!!!!!!!



 
Reply With Quote
 
 
 
 
Tim
Guest
Posts: n/a
 
      13th Jul 2007


"LTaylor" <(E-Mail Removed)> wrote in message
news:5F940892-6C01-4F00-A600-(E-Mail Removed)...
>I have copied the code which makes it possible to choose more than one item


What code ?

Tim


> from a dropdown list in excel. Something I'm not clear on is, once the
> code
> is copied to the worksheet is that ability to pick more than one variable
> from a list valid for every column in the worksheet of just one column? I
> copied the code and it is only working for the column which was
> highlighted
> when I pasted the code. I need this to work for all my dropdown list
> within
> a single worksheet. Any help is so appreciated!!!!!!!!
>
>
>



 
Reply With Quote
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      13th Jul 2007
I doubt anyone knows what you are talking about. Post the code that you
claim allows you to do this. Also say what kind of dropdown you are using.

--
Regards,
Tom Ogilvy


"LTaylor" wrote:

> I have copied the code which makes it possible to choose more than one item
> from a dropdown list in excel. Something I’m not clear on is, once the code
> is copied to the worksheet is that ability to pick more than one variable
> from a list valid for every column in the worksheet of just one column? I
> copied the code and it is only working for the column which was highlighted
> when I pasted the code. I need this to work for all my dropdown list within
> a single worksheet. Any help is so appreciated!!!!!!!!
>
>
>

 
Reply With Quote
 
=?Utf-8?B?TFRheWxvcg==?=
Guest
Posts: n/a
 
      13th Jul 2007
I'm sorry I'm new at this. This is for a list dropdown. I see that this
code is referencing target.column = 3

When I use this code it does allow more than one choice in column 3 but, how
do I make it reference more than one column? Thank you

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



"Tom Ogilvy" wrote:

> I doubt anyone knows what you are talking about. Post the code that you
> claim allows you to do this. Also say what kind of dropdown you are using.
>
> --
> Regards,
> Tom Ogilvy
>
>
> "LTaylor" wrote:
>
> > I have copied the code which makes it possible to choose more than one item
> > from a dropdown list in excel. Something I’m not clear on is, once the code
> > is copied to the worksheet is that ability to pick more than one variable
> > from a list valid for every column in the worksheet of just one column? I
> > copied the code and it is only working for the column which was highlighted
> > when I pasted the code. I need this to work for all my dropdown list within
> > a single worksheet. Any help is so appreciated!!!!!!!!
> >
> >
> >

 
Reply With Quote
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      13th Jul 2007
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

' add your criteria for columns here

If Target.Column = 3 or Target.Column = 5 or _
Target.column = 7 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

--
Regards,
Tom Ogilvy

"LTaylor" wrote:

> I'm sorry I'm new at this. This is for a list dropdown. I see that this
> code is referencing target.column = 3
>
> When I use this code it does allow more than one choice in column 3 but, how
> do I make it reference more than one column? Thank you
>
> 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
>
>
>
> "Tom Ogilvy" wrote:
>
> > I doubt anyone knows what you are talking about. Post the code that you
> > claim allows you to do this. Also say what kind of dropdown you are using.
> >
> > --
> > Regards,
> > Tom Ogilvy
> >
> >
> > "LTaylor" wrote:
> >
> > > I have copied the code which makes it possible to choose more than one item
> > > from a dropdown list in excel. Something I’m not clear on is, once the code
> > > is copied to the worksheet is that ability to pick more than one variable
> > > from a list valid for every column in the worksheet of just one column? I
> > > copied the code and it is only working for the column which was highlighted
> > > when I pasted the code. I need this to work for all my dropdown list within
> > > a single worksheet. Any help is so appreciated!!!!!!!!
> > >
> > >
> > >

 
Reply With Quote
 
=?Utf-8?B?TFRheWxvcg==?=
Guest
Posts: n/a
 
      13th Jul 2007
Thank you! You are wonderful.

"Tom Ogilvy" wrote:

> 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
>
> ' add your criteria for columns here
>
> If Target.Column = 3 or Target.Column = 5 or _
> Target.column = 7 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
>
> --
> Regards,
> Tom Ogilvy
>
> "LTaylor" wrote:
>
> > I'm sorry I'm new at this. This is for a list dropdown. I see that this
> > code is referencing target.column = 3
> >
> > When I use this code it does allow more than one choice in column 3 but, how
> > do I make it reference more than one column? Thank you
> >
> > 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
> >
> >
> >
> > "Tom Ogilvy" wrote:
> >
> > > I doubt anyone knows what you are talking about. Post the code that you
> > > claim allows you to do this. Also say what kind of dropdown you are using.
> > >
> > > --
> > > Regards,
> > > Tom Ogilvy
> > >
> > >
> > > "LTaylor" wrote:
> > >
> > > > I have copied the code which makes it possible to choose more than one item
> > > > from a dropdown list in excel. Something I’m not clear on is, once the code
> > > > is copied to the worksheet is that ability to pick more than one variable
> > > > from a list valid for every column in the worksheet of just one column? I
> > > > copied the code and it is only working for the column which was highlighted
> > > > when I pasted the code. I need this to work for all my dropdown list within
> > > > a single worksheet. Any help is so appreciated!!!!!!!!
> > > >
> > > >
> > > >

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
drop down data want to choose more than one item for cell FranW Microsoft Excel Worksheet Functions 1 26th Feb 2010 08:44 PM
Make query ask for input, user selects item from drop down list. Rob F Microsoft Access Queries 0 1st Apr 2008 09:18 PM
How do I make a drop-down list that allows me to select >1 item? =?Utf-8?B?RGF2aWQgSw==?= Microsoft Word Document Management 1 27th Jun 2007 01:17 AM
Make typing "jump" to matching item(s) in drop-down list? =?Utf-8?B?S2F0aHk=?= Microsoft Excel Misc 4 22nd Nov 2005 10:25 PM
Re: Make drop down field item read only based on user of form? Max Beesley Microsoft Outlook Form Programming 3 10th Jul 2003 01:53 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:58 PM.