Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Parsing after multiple selection in drop-down?

Hi,
Using some great code from the "Contextures" website, I'm able to choose
multiple items from a drop-down list, then have them all appear in the same
cell (separated by commas. ) E.g., 4 items might be selected, and all
appear in cell G8:
Commercial, DDA, Treasury, Cash

Now I need to parse them and place each one in the next row down. I.e.,
'Commercial' in cell G8
'DDA' in cell G9
'Treasury' in cell G10
'Cash' in cell G11

Thanks for any help.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Parsing after multiple selection in drop-down?

If you could post the code you are using to get the items out of the list and
into the cell, it might be easier to modify that code than to have to start
over and parse out the cell content and move it to separate cells.

I'd be happy to take a look at your code

just a thought

David

"DianeN" wrote:

Hi,
Using some great code from the "Contextures" website, I'm able to choose
multiple items from a drop-down list, then have them all appear in the same
cell (separated by commas. ) E.g., 4 items might be selected, and all
appear in cell G8:
Commercial, DDA, Treasury, Cash

Now I need to parse them and place each one in the next row down. I.e.,
'Commercial' in cell G8
'DDA' in cell G9
'Treasury' in cell G10
'Cash' in cell G11

Thanks for any help.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Parsing after multiple selection in drop-down?



"dkinn" wrote:

If you could post the code you are using to get the items out of the list and
into the cell, it might be easier to modify that code than to have to start
over and parse out the cell content and move it to separate cells.

I'd be happy to take a look at your code

Here it is, and thanks very much

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 = 7 Or 11 Or 15 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
just a thought

David

"DianeN" wrote:

Hi,
Using some great code from the "Contextures" website, I'm able to choose
multiple items from a drop-down list, then have them all appear in the same
cell (separated by commas. ) E.g., 4 items might be selected, and all
appear in cell G8:
Commercial, DDA, Treasury, Cash

Now I need to parse them and place each one in the next row down. I.e.,
'Commercial' in cell G8
'DDA' in cell G9
'Treasury' in cell G10
'Cash' in cell G11

Thanks for any help.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default Parsing after multiple selection in drop-down?

I've updated the sample file to include an example of copying values to
multiple rows:

http://www.contextures.com/excelfiles.html

Under Data Validation, look for 'DV0017 - Select Multiple Items from
Dropdown List'


DianeN wrote:
Hi,
Using some great code from the "Contextures" website, I'm able to choose
multiple items from a drop-down list, then have them all appear in the same
cell (separated by commas. ) E.g., 4 items might be selected, and all
appear in cell G8:
Commercial, DDA, Treasury, Cash

Now I need to parse them and place each one in the next row down. I.e.,
'Commercial' in cell G8
'DDA' in cell G9
'Treasury' in cell G10
'Cash' in cell G11

Thanks for any help.



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Parsing after multiple selection in drop-down?

Debra, you are awesome! Thank you!

"Debra Dalgleish" wrote:

I've updated the sample file to include an example of copying values to
multiple rows:

http://www.contextures.com/excelfiles.html

Under Data Validation, look for 'DV0017 - Select Multiple Items from
Dropdown List'


DianeN wrote:
Hi,
Using some great code from the "Contextures" website, I'm able to choose
multiple items from a drop-down list, then have them all appear in the same
cell (separated by commas. ) E.g., 4 items might be selected, and all
appear in cell G8:
Commercial, DDA, Treasury, Cash

Now I need to parse them and place each one in the next row down. I.e.,
'Commercial' in cell G8
'DDA' in cell G9
'Treasury' in cell G10
'Cash' in cell G11

Thanks for any help.



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default Parsing after multiple selection in drop-down?

You're welcome!

DianeN wrote:
Debra, you are awesome! Thank you!

"Debra Dalgleish" wrote:


I've updated the sample file to include an example of copying values to
multiple rows:

http://www.contextures.com/excelfiles.html

Under Data Validation, look for 'DV0017 - Select Multiple Items from
Dropdown List'


DianeN wrote:

Hi,
Using some great code from the "Contextures" website, I'm able to choose
multiple items from a drop-down list, then have them all appear in the same
cell (separated by commas. ) E.g., 4 items might be selected, and all
appear in cell G8:
Commercial, DDA, Treasury, Cash

Now I need to parse them and place each one in the next row down. I.e.,
'Commercial' in cell G8
'DDA' in cell G9
'Treasury' in cell G10
'Cash' in cell G11

Thanks for any help.



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html





--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Parsing after multiple selection in drop-down?

I like your code, you've got some good examples up there
Thanks

David

"DianeN" wrote:

Debra, you are awesome! Thank you!

"Debra Dalgleish" wrote:

I've updated the sample file to include an example of copying values to
multiple rows:

http://www.contextures.com/excelfiles.html

Under Data Validation, look for 'DV0017 - Select Multiple Items from
Dropdown List'


DianeN wrote:
Hi,
Using some great code from the "Contextures" website, I'm able to choose
multiple items from a drop-down list, then have them all appear in the same
cell (separated by commas. ) E.g., 4 items might be selected, and all
appear in cell G8:
Commercial, DDA, Treasury, Cash

Now I need to parse them and place each one in the next row down. I.e.,
'Commercial' in cell G8
'DDA' in cell G9
'Treasury' in cell G10
'Cash' in cell G11

Thanks for any help.



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Parsing after multiple selection in drop-down?

David, thanks so much for helping!

"dkinn" wrote:

I like your code, you've got some good examples up there
Thanks

David

"DianeN" wrote:

Debra, you are awesome! Thank you!

"Debra Dalgleish" wrote:

I've updated the sample file to include an example of copying values to
multiple rows:

http://www.contextures.com/excelfiles.html

Under Data Validation, look for 'DV0017 - Select Multiple Items from
Dropdown List'


DianeN wrote:
Hi,
Using some great code from the "Contextures" website, I'm able to choose
multiple items from a drop-down list, then have them all appear in the same
cell (separated by commas. ) E.g., 4 items might be selected, and all
appear in cell G8:
Commercial, DDA, Treasury, Cash

Now I need to parse them and place each one in the next row down. I.e.,
'Commercial' in cell G8
'DDA' in cell G9
'Treasury' in cell G10
'Cash' in cell G11

Thanks for any help.


--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html


  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default Parsing after multiple selection in drop-down?

Thanks!

dkinn wrote:
I like your code, you've got some good examples up there
Thanks

David

"DianeN" wrote:


Debra, you are awesome! Thank you!

"Debra Dalgleish" wrote:


I've updated the sample file to include an example of copying values to
multiple rows:

http://www.contextures.com/excelfiles.html

Under Data Validation, look for 'DV0017 - Select Multiple Items from
Dropdown List'


DianeN wrote:

Hi,
Using some great code from the "Contextures" website, I'm able to choose
multiple items from a drop-down list, then have them all appear in the same
cell (separated by commas. ) E.g., 4 items might be selected, and all
appear in cell G8:
Commercial, DDA, Treasury, Cash

Now I need to parse them and place each one in the next row down. I.e.,
'Commercial' in cell G8
'DDA' in cell G9
'Treasury' in cell G10
'Cash' in cell G11

Thanks for any help.


--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html





--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html

  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default One more ? re Parsing after multiple selection in drop-down?

one more question. After using the code Debra was kind enough to share, I
need to apply the action (choose from a pull down menu and place each entry
into a new row) to 4 or 5 specific columns. I tried the following but it
didn't work.
Thanks for any help.

Here's the code: (the line with all the stars is what I tried).
------
Public Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo exitHandler

Dim rngDV As Range
Dim lRow As Long
Dim lCol As Long

********lCol = 7 or 14 or 18 or 12 'column with data validation cell****
(I also tried using "And")


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
If Target.Column = lCol Then
If Target.Value = "" Then GoTo exitHandler
If Target.Offset(0, 1).Value = "" Then
lRow = Target.Row
Else
lRow = Cells(Rows.Count, lCol + 1).End(xlUp).Row + 1
End If

Cells(lRow, lCol + 1).Value = Target.Value
End If
End If

exitHandler:
Application.EnableEvents = True

End Sub



"Debra Dalgleish" wrote:

Thanks!

dkinn wrote:
I like your code, you've got some good examples up there
Thanks

David

"DianeN" wrote:


Debra, you are awesome! Thank you!

"Debra Dalgleish" wrote:


I've updated the sample file to include an example of copying values to
multiple rows:

http://www.contextures.com/excelfiles.html

Under Data Validation, look for 'DV0017 - Select Multiple Items from
Dropdown List'


DianeN wrote:

Hi,
Using some great code from the "Contextures" website, I'm able to choose
multiple items from a drop-down list, then have them all appear in the same
cell (separated by commas. ) E.g., 4 items might be selected, and all
appear in cell G8:
Commercial, DDA, Treasury, Cash

Now I need to parse them and place each one in the next row down. I.e.,
'Commercial' in cell G8
'DDA' in cell G9
'Treasury' in cell G10
'Cash' in cell G11

Thanks for any help.


--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html





--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html




  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default One more ? re Parsing after multiple selection in drop-down?

You can make lCol = Target.column, then use Select Case to test for the
columns of interest.
I've updated the sample file for multiple rows, so it works for data
validation dropdowns in several columns:

http://www.contextures.com/excelfiles.html

Under Data Validation, look for 'DV0017 - Select Multiple Items from
Dropdown List'


DianeN wrote:
one more question. After using the code Debra was kind enough to share, I
need to apply the action (choose from a pull down menu and place each entry
into a new row) to 4 or 5 specific columns. I tried the following but it
didn't work.
Thanks for any help.

Here's the code: (the line with all the stars is what I tried).
------
Public Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo exitHandler

Dim rngDV As Range
Dim lRow As Long
Dim lCol As Long

********lCol = 7 or 14 or 18 or 12 'column with data validation cell****
(I also tried using "And")


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
If Target.Column = lCol Then
If Target.Value = "" Then GoTo exitHandler
If Target.Offset(0, 1).Value = "" Then
lRow = Target.Row
Else
lRow = Cells(Rows.Count, lCol + 1).End(xlUp).Row + 1
End If

Cells(lRow, lCol + 1).Value = Target.Value
End If
End If

exitHandler:
Application.EnableEvents = True

End Sub



"Debra Dalgleish" wrote:


Thanks!

dkinn wrote:

I like your code, you've got some good examples up there
Thanks

David

"DianeN" wrote:



Debra, you are awesome! Thank you!

"Debra Dalgleish" wrote:



I've updated the sample file to include an example of copying values to
multiple rows:

http://www.contextures.com/excelfiles.html

Under Data Validation, look for 'DV0017 - Select Multiple Items from
Dropdown List'


DianeN wrote:


Hi,
Using some great code from the "Contextures" website, I'm able to choose
multiple items from a drop-down list, then have them all appear in the same
cell (separated by commas. ) E.g., 4 items might be selected, and all
appear in cell G8:
Commercial, DDA, Treasury, Cash

Now I need to parse them and place each one in the next row down. I.e.,
'Commercial' in cell G8
'DDA' in cell G9
'Treasury' in cell G10
'Cash' in cell G11

Thanks for any help.


--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html




--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html





--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html

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
Multiple selection drop down list The Bon Excel Worksheet Functions 2 April 8th 09 11:53 PM
Drop Down - Multiple Items Selection VLH Excel Discussion (Misc queries) 0 April 30th 08 10:08 PM
Possible to create multiple-selection drop-down box in Excel? Jenty56 Excel Worksheet Functions 1 March 31st 07 06:57 AM
Can I set up a multiple selection drop down list? Colder New Users to Excel 4 August 25th 06 06:12 PM
How to allow multiple selection capability in excel drop down lis. WritingAcademy Excel Discussion (Misc queries) 1 March 9th 06 12:27 AM


All times are GMT +1. The time now is 09:06 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"