Thread: [Solved] ***help*** macro needed
View Single Post
 
Old 03-16-2015, 04:26 PM
Snakehips Snakehips is offline Windows 8 Office 2013
Advanced Beginner
 
Join Date: Mar 2015
Posts: 36
Snakehips is on a distinguished road
Default

PokerBob,

Try the below....

Code:
Sub Selection_Col2Row()

With Selection
If .Rows.Count < 2 Then Exit Sub
If .Columns.Count > 1 Then Exit Sub
Set Rng = .Offset(1, 0).Resize(.Rows.Count - 1, 1)
End With

With Rng
  Rng.Copy
    .Cells(1, 1).Offset(-1, 1).Select
    Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
        False, Transpose:=True
   .ClearContents
   .Cells(1, 1).Offset(-1, 0).Select
    Application.CutCopyMode = False
End With
End Sub
Hope that helps.
Reply With Quote