Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Multiple choice in dropdown list

Hi,

I needed to make a cell to collect all the options chosen in a list as
described in the example DV0017 - Select Multiple Items from Dropdown List of
Debra Dalgleish, which was very helpful. The problem is that I need it to
work for 2 different columns and each of them should collects the options
from different lists. When I tried to apply it for 2 different targets I get
an error. Is there anyone that could help me?

Thank you!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Multiple choice in dropdown list

I need to reformulate my question.

The thing is I found in the file how to apply the option for different
columns, but it inserts the options in different rows.

In the example below the options are added in the same cell with line
breaks. How could I apply it to another column according to what is written
below?

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 = 19 Then
If oldVal = "" Then
'do nothing
Else
If newVal = "" Then
'do nothing
Else
Target.Value = oldVal _
& Chr(10) & newVal
End If
End If
End If
End If

exitHandler:
Application.EnableEvents = True
End Sub



"Augusta" wrote:

Hi,

I needed to make a cell to collect all the options chosen in a list as
described in the example DV0017 - Select Multiple Items from Dropdown List of
Debra Dalgleish, which was very helpful. The problem is that I need it to
work for 2 different columns and each of them should collects the options
from different lists. When I tried to apply it for 2 different targets I get
an error. Is there anyone that could help me?

Thank you!

Reply
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
Drop-Down List Choice Affects Multiple Cells? Patrick R Excel Worksheet Functions 5 November 24th 06 01:33 AM
VBA code to open dropdown box(s) in XL, permit a choice, then resu Dennis Excel Discussion (Misc queries) 0 February 26th 06 07:15 PM
How do i create a multiple choice drop down list Piper Charts and Charting in Excel 3 September 8th 05 12:40 AM
Dropdown list/Multiple choice?? KDD Excel Discussion (Misc queries) 2 August 30th 05 09:28 AM
how to create multiple hyperlinks within a dropdown list dan Excel Discussion (Misc queries) 0 June 29th 05 01:49 AM


All times are GMT +1. The time now is 08:19 PM.

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"