View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
pikus pikus is offline
external usenet poster
 
Posts: 1
Default Help with macro to transpose data

Public Sub AddressSort()
last = ActiveSheet.UsedRange.Row - 1 + _
ActiveSheet.UsedRange.Rows.Count
With Worksheets(1)
For x = last To 2 Step -1
If .Cells(x, 1).Value < "" And _
.Cells(x - 1, 1).Value < "" Then
.Range(.Cells(x, 1), .Cells(x, 10)).Cop
Destination:=.Range(.Cells(x - 1, 2), .Cells(x - 1, 2))
.Rows(x).Delete
End If
Next x
.Range("A:A").SpecialCells(xlCellTypeBlanks).Entir eRow.Delete
End With
End Sub

Let me know if you have any questions. - Piku

--
Message posted from http://www.ExcelForum.com