How do I remove delimiting from a series of columns?

G

Guest

I have a large block of columns which I had to delimit, then change the info
inside, and now I have to put that information back into the original single
column it came from.

How can I do this?

EX

A1 B1 C1 D1
x x x x

back into

A1
xxxx


Thanks for any help :)
 
G

Gord Dibben

Zemo

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 If 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
 
G

Gord Dibben

Apologies.

You did say a block of columns.

My code is not practical for that operation.

See J.E.'s posting.

Gord
 
G

Gord Dibben

Apologies.

You did say a block of columns.

My code is not practical for that operation.

See J.E.'s posting.

Gord
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top