Supposed you have a drop down list quot;1,2,3,4,5,6,7.quot;
How do you make it such that when you click on say 2 on the dropdown
list it will list two then when you click 3 on the same cell, it will
keep 2 and 3, and so on until you have something like a phrase.
(2,3,5,4..) on the same cell?
Thanks. This forum has always been helpful.--
cardingtr
------------------------------------------------------------------------
cardingtr's Profile: www.excelforum.com/member.php...oamp;userid=27027
View this thread: www.excelforum.com/showthread...hreadid=517773You can do this with programming. There's a sample file he
www.contextures.com/excelfiles.html
Under Data Validation, look for 'Select Multiple Items from Dropdown List'cardingtr wrote:
gt; Supposed you have a drop down list quot;1,2,3,4,5,6,7.quot;
gt;
gt; How do you make it such that when you click on say 2 on the dropdown
gt; list it will list two then when you click 3 on the same cell, it will
gt; keep 2 and 3, and so on until you have something like a phrase.
gt; (2,3,5,4..) on the same cell?
--
Debra Dalgleish
Excel FAQ, Tips amp; Book List
www.contextures.com/tiptech.html
I don't think you can - that's not the way it's meant to work.
Drop downs are to select one option from the list, not multiple
selections. You would need to have a number of drop down boxes and
then CONCATENATE the results in another cell.
HTH
Ed--
EdMac
------------------------------------------------------------------------
EdMac's Profile: www.excelforum.com/member.php...oamp;userid=30736
View this thread: www.excelforum.com/showthread...hreadid=517773
Debra Dalgleish Wrote:
gt; You can do this with programming. There's a sample file he
gt;
gt; www.contextures.com/excelfiles.html
gt;
gt; Under Data Validation, look for 'Select Multiple Items from Dropdown
gt; List'
gt;
gt;
gt; cardingtr wrote:
gt; gt; Supposed you have a drop down list quot;1,2,3,4,5,6,7.quot;
gt; gt;
gt; gt; How do you make it such that when you click on say 2 on the dropdown
gt; gt; list it will list two then when you click 3 on the same cell, it
gt; will
gt; gt; keep 2 and 3, and so on until you have something like a phrase.
gt; gt; (2,3,5,4..) on the same cell?
gt;
gt; --
gt; Debra Dalgleish
gt; Excel FAQ, Tips amp; Book List
gt; www.contextures.com/tiptech.html
Thanks for your suggested link.
It works but only for one column at a time. How can I make this formula
to work for all or multiple column in one sheet?
Thanks a lot. Here is the formula:
_________________________
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 gt; 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 = 4 Then
If oldVal = quot;quot; Then
'do nothing
Else
If newVal = quot;quot; Then
'do nothing
Else
Target.Value = oldVal _
amp; quot;, quot; amp; newVal
End If
End If
End If
End If
exitHandler:
Application.EnableEvents = True
End Sub
_________________________--
cardingtr
------------------------------------------------------------------------
cardingtr's Profile: www.excelforum.com/member.php...oamp;userid=27027
View this thread: www.excelforum.com/showthread...hreadid=517773Remove the line:
If Target.Column = 4 Then
and its End If
cardingtr wrote:
gt; Debra Dalgleish Wrote:
gt;
gt;gt;You can do this with programming. There's a sample file he
gt;gt;
gt;gt;www.contextures.com/excelfiles.html
gt;gt;
gt;gt;Under Data Validation, look for 'Select Multiple Items from Dropdown
gt;gt;List'
gt;gt;
gt;gt;
gt;gt;cardingtr wrote:
gt;gt;
gt;gt;gt;Supposed you have a drop down list quot;1,2,3,4,5,6,7.quot;
gt;gt;gt;
gt;gt;gt;How do you make it such that when you click on say 2 on the dropdown
gt;gt;gt;list it will list two then when you click 3 on the same cell, it
gt;gt;
gt;gt;will
gt;gt;
gt;gt;gt;keep 2 and 3, and so on until you have something like a phrase.
gt;gt;gt;(2,3,5,4..) on the same cell?
gt;gt;
gt;gt;--
gt;gt;Debra Dalgleish
gt;gt;Excel FAQ, Tips amp; Book List
gt;gt;www.contextures.com/tiptech.html
gt;
gt;
gt; Thanks for your suggested link.
gt; It works but only for one column at a time. How can I make this formula
gt; to work for all or multiple column in one sheet?
gt; Thanks a lot. Here is the formula:
gt; _________________________
gt; Option Explicit
gt;
gt; Private Sub Worksheet_Change(ByVal Target As Range)
gt; Dim rngDV As Range
gt; Dim oldVal As String
gt; Dim newVal As String
gt; If Target.Count gt; 1 Then GoTo exitHandler
gt;
gt; On Error Resume Next
gt; Set rngDV = Cells.SpecialCells(xlCellTypeAllValidation)
gt; On Error GoTo exitHandler
gt;
gt; If rngDV Is Nothing Then GoTo exitHandler
gt;
gt; If Intersect(Target, rngDV) Is Nothing Then
gt; 'do nothing
gt; Else
gt; Application.EnableEvents = False
gt; newVal = Target.Value
gt; Application.Undo
gt; oldVal = Target.Value
gt; Target.Value = newVal
gt; If Target.Column = 4 Then
gt; If oldVal = quot;quot; Then
gt; 'do nothing
gt; Else
gt; If newVal = quot;quot; Then
gt; 'do nothing
gt; Else
gt; Target.Value = oldVal _
gt; amp; quot;, quot; amp; newVal
gt; End If
gt; End If
gt; End If
gt; End If
gt;
gt; exitHandler:
gt; Application.EnableEvents = True
gt; End Sub
gt; _________________________
gt;
gt;--
Debra Dalgleish
Excel FAQ, Tips amp; Book List
www.contextures.com/tiptech.html
Thanks Debra, it worked!--
cardingtr
------------------------------------------------------------------------
cardingtr's Profile: www.excelforum.com/member.php...oamp;userid=27027
View this thread: www.excelforum.com/showthread...hreadid=517773
- Nov 21 Wed 2007 20:40
dropdown list
close
全站熱搜
留言列表
發表留言