Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
RAB
Looks like you want the results to be placed in one cell, not one row. Sub ConCat_Cells() Dim x As Range Dim y As Range Dim z As Range Dim w As String Dim sbuf As String On Error GoTo endit w = InputBox("Enter the Type of De-limiter Desired") Set z = Application.InputBox("Select Destination Cell", _ "Destination Cell", , , , , , 8) Application.SendKeys "+{F8}" Set x = Application.InputBox("Select Cells...Contiguous or _ Non-Contiguous", "Cells Selection", , , , , , 8) For Each y In x If Len(y.text) 0 Then sbuf = sbuf & y.text & w Next z = Left(sbuf, Len(sbuf) - 1) Exit Sub endit: MsgBox "Nothing Selected. Please try again." End Sub Gord Dibben Excel MVP On Tue, 20 Jul 2004 18:45:04 -0700, RAB wrote: I have data that looks like this: 199 7/20/2004 1Z9952220245265501 199 7/20/2004 1Z9952220245959119 199 7/20/2004 1Z9952220244763322 200 7/21/2004 1Z9952220244788457 I need the data to look like this: (commas or spaces) doesn't matter 199,7/20/2004,1Z9952220245265501,1Z9952220245959119,1Z99522 20244763322 200,7/21/2004,1Z9952220244788457 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you so much.....
"Gord Dibben" wrote: RAB Looks like you want the results to be placed in one cell, not one row. Sub ConCat_Cells() Dim x As Range Dim y As Range Dim z As Range Dim w As String Dim sbuf As String On Error GoTo endit w = InputBox("Enter the Type of De-limiter Desired") Set z = Application.InputBox("Select Destination Cell", _ "Destination Cell", , , , , , 8) Application.SendKeys "+{F8}" Set x = Application.InputBox("Select Cells...Contiguous or _ Non-Contiguous", "Cells Selection", , , , , , 8) For Each y In x If Len(y.text) 0 Then sbuf = sbuf & y.text & w Next z = Left(sbuf, Len(sbuf) - 1) Exit Sub endit: MsgBox "Nothing Selected. Please try again." End Sub Gord Dibben Excel MVP On Tue, 20 Jul 2004 18:45:04 -0700, RAB wrote: I have data that looks like this: 199 7/20/2004 1Z9952220245265501 199 7/20/2004 1Z9952220245959119 199 7/20/2004 1Z9952220244763322 200 7/21/2004 1Z9952220244788457 I need the data to look like this: (commas or spaces) doesn't matter 199,7/20/2004,1Z9952220245265501,1Z9952220245959119,1Z99522 20244763322 200,7/21/2004,1Z9952220244788457 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
colating multi rows of data into single rows - no to pivot tables! | Excel Worksheet Functions | |||
Auto extract data & inserts rows additional rows automatically | Excel Discussion (Misc queries) | |||
Enabling option „Format rows“ to hide/unhide rows using VBA-code? | Excel Discussion (Misc queries) | |||
Copy rows of data (eliminating blank rows) from fixed layout | Excel Discussion (Misc queries) | |||
Excel 2003 -Rows hidden. Scrolling unhides rows ! How do I stop th | Excel Discussion (Misc queries) |