Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy and transpose
Have a long list of entries. Each entry is the same with a name, address,
email etc. all in a column. Then the next entry is two lines down. How can I copy all the entries and paste them transposing the columns and rows? I'm sure I'll need a macro of some sort, but I'm rusty on macro making. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy and transpose
Assume your entries don't contain blank cells. and no listing is less than 3
rows. Sub ProcessData() Dim rng As Range, rng1 As Range ActiveSheet.Copy After:=Worksheets(Worksheets.Count) Range("A1").Select If IsEmpty(ActiveCell) Then ActiveCell.End(xlDown).Select End If Do While Not ActiveCell.Row = Rows.Count Set rng = Range(ActiveCell.Offset(1, 0), ActiveCell.End(xlDown)) If rng.Count 8 Then MsgBox "Data screwed up" Exit Sub End If rng.Copy Set rng1 = ActiveCell ActiveCell.Offset(0, 1).PasteSpecial Transpose:=True rng.ClearContents rng1.End(xlDown).Select Loop Columns(1).SpecialCells(xlBlanks).EntireRow.Delete End Sub See if that is a start. -- Regards, Tom Ogilvy "deemcm" wrote: Have a long list of entries. Each entry is the same with a name, address, email etc. all in a column. Then the next entry is two lines down. How can I copy all the entries and paste them transposing the columns and rows? I'm sure I'll need a macro of some sort, but I'm rusty on macro making. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copy transpose paste | Excel Discussion (Misc queries) | |||
COPY RIGHT AND TRANSPOSE | Excel Worksheet Functions | |||
Copy and Transpose Paste | Excel Discussion (Misc queries) | |||
Copy then Paste with a transpose | Excel Discussion (Misc queries) | |||
Copy / Paste - Kind of Transpose | New Users to Excel |