Transpose Data String in Individual Cell

Daddy007

New member
Joined
Jul 15, 2016
Messages
13
Reaction score
0
Points
0
Excel Version(s)
Excel 2010
:rolleyes2 Hello everyone,

Could anyone provide me with a macro for book1.

Colume A and Colume C data strings needs to be transpose in a

single cell vertically.


Examples at the right.




Thanks for any asistance.
 

Attachments

  • Book1.xlsm
    10.7 KB · Views: 13
In the attached, try clicking the button on the sheet. It calls this code:
Code:
Sub blah()
Set Destn = Range("F3")
For Each cll In Range("A3,C3").Cells
  Set CopySourceRng = cll.CurrentRegion
  CopySourceRng.Copy
  With Destn.Offset(cll.Column - 1)    'destination
    .PasteSpecial Transpose:=True
    .Resize(, CopySourceRng.Rows.Count).Orientation = xlVertical
  End With
Next cll
End Sub
A bit hard-coded for the moment.
Will it do?
 

Attachments

  • ExcelGuru8804.xlsm
    18.3 KB · Views: 12
Code:
Sub M_snb()
   For j = 0 To 9
       UsedRange.Columns(1).resize(,3).Replace j, j & vbLf
   Next
   Cells(8, 6).Resize(, UsedRange.Columns(1).SpecialCells(2).Count) = Application.Transpose(UsedRange.Columns(1).SpecialCells(2))
   Cells(20, 6).Resize(, UsedRange.Columns(3).SpecialCells(2).Count) = Application.Transpose(UsedRange.Columns(3).SpecialCells(2))
End Sub
 
Thanks snb,

my pc is down but I will try this code this week.

Thanks again.
 
Thanks p45cal,

my pc is down but I will try this code this week.

Thanks again.
 
Back
Top