Hi,

I found this great macro to use in a spreadsheet I'm trying to transpose from rows to columns, however, I need a place holder for blank cells:

http://www.excelforum.com/excel-prog...o-columns.html

I was able to use the macro in the last post by Ochenden but the blank cells need to have a placeholder.

Can anyone change the macro or come up with a different script for me to use?

Attached is how I need the spreadsheet to look.

Script I used:

Sub aaa()
Dim OutSH As Worksheet
Set OutSH = Sheets("Sheet2")

Range("A:A").AdvancedFilter Action:=xlFilterCopy, copytorange:=OutSH.Range("A1"), Unique:=xlYes

'determine last column based on header
lastcol = Cells(1, Columns.Count).End(xlToLeft).Column

For Each ce In Range("A2:A" & Cells(Rows.Count, 1).End(xlUp).Row)
Set findit = OutSH.Range("A:A").Find(what:=ce.Value)
For i = 2 To lastcol
OutSH.Cells(findit.Row, Columns.Count).End(xlToLeft).Offset(0, 1).Value = Cells(ce.Row, i).Value
Next i
Next ce
With OutSH
End With
End Sub


Thanks,Transpose_Duplicates_Examples.xlsx