Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy transpose paste danel Excel Discussion (Misc queries) 0 December 27th 10 08:22 AM
COPY RIGHT AND TRANSPOSE Pam M Excel Worksheet Functions 2 April 7th 09 11:45 PM
Copy and Transpose Paste HAS Excel Discussion (Misc queries) 2 February 15th 09 01:50 PM
Copy then Paste with a transpose SteveM Excel Discussion (Misc queries) 2 November 29th 07 06:01 PM
Copy / Paste - Kind of Transpose Carl Jarvis New Users to Excel 1 October 11th 05 04:27 AM


All times are GMT +1. The time now is 08:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"