View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Hopefully an easy one - turning a list into a row

You didn't say where the column of data is, so I assumed A1 on down. Also,
you didn't say where you wanted the resulting string to be placed at, so I
assumed B1

Sub MakeColumnIntoRow()
Dim LastRow As Long, Destination As Range
Set Destination = Range("B1")
With ActiveSheet
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
Destination.Value = Join(WorksheetFunction.Transpose( _
Range("A1:A" & LastRow)), "|")
End With
End Sub

--
Rick (MVP - Excel)


"Adam" wrote in message
...
Hi

I am trying to convert a column of numbers into a row with separating
characters (|) inserted between each occurrence

So from this

00030707
039027258
060004239
060004882

To this

00030707|039027258|060004239|060004882

The other thing is that this column can have of any amount of numbers
listed
in it.


Any ideas?

Many thanks