#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default change row to column

Hi,

I imported an address book. Column A contains all the information, 430
lines consisting of 1 name, 2 address, 3 city, 4 State, 5 Zip, 6 name, 7
address, 8 city, 9 State, 10 Zip 11 name and so forth.

Is there an easy way to move the row to columns each in their own block?
--
Thank You
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default change row to column

Is there an easy way to move the row to columns
each in their own block?


Easy is a tricky term. It means different things to different people!

Let's assume your data is in the range A2:A21.

Enter this formula in C2:

=INDEX($A$2:$A$21,(ROWS($1:1)-1)*5+COLUMNS($A:B)-1)

Copy across to G2 then down to row 5.

After you have the data transposed inspect it and make sure it's correct.

Select the entire range of formulas
Goto the menu EditCopy
Then, EditPaste SpecialValuesOK

Now you can delete the original data in column A (if you want to).


--
Biff
Microsoft Excel MVP


"Humbled Learner" wrote in
message ...
Hi,

I imported an address book. Column A contains all the information, 430
lines consisting of 1 name, 2 address, 3 city, 4 State, 5 Zip, 6 name, 7
address, 8 city, 9 State, 10 Zip 11 name and so forth.

Is there an easy way to move the row to columns each in their own block?
--
Thank You



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default change row to column


If your names are all in column A in pairs of 5 rows, this macro will
re-sort them into Columns D through H, complete with labels.

Try it on a copy of your data, make sure Columns D through H are clear.

=============Macro=========
Sub SortAddressList()
Application.ScreenUpdating = False
On Error GoTo 20

Range("D1").FormulaR1C1 = "Name"
Range("E1").FormulaR1C1 = "Address"
Range("F1").FormulaR1C1 = "City"
Range("G1").FormulaR1C1 = "State"
Range("H1").FormulaR1C1 = "Zip"
Range("D1:H1").Font.Bold = True

Range("A1").Select
Selection.Resize(Selection.Rows.Count + 4, _
Selection.Columns.Count).Select
Selection.Copy
Range("D65000").End(xlUp).Offset(1, 0).PasteSpecial
Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Range("A1").Select
Selection.Resize(Selection.Rows.Count + 4, _
Selection.Columns.Count).ClearContents
Application.CutCopyMode = False

10
Range("A1").End(xlDown).Select
Selection.Resize(Selection.Rows.Count + 4, _
Selection.Columns.Count).Select
Selection.Copy
Range("D65000").End(xlUp).Offset(1, 0).PasteSpecial
Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Range("A1").End(xlDown).Select
Selection.Resize(Selection.Rows.Count + 4, _
Selection.Columns.Count).ClearContents
Application.CutCopyMode = False
GoTo 10
Application.ScreenUpdating = True

20
Range("D1").Select
Application.ScreenUpdating = True
End Sub
======================


--
JBeaucaire
------------------------------------------------------------------------
JBeaucaire's Profile: http://www.thecodecage.com/forumz/member.php?userid=73
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=47916

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
change column numbering to column letters in my spreadsheet view ferdla Excel Discussion (Misc queries) 1 April 29th 08 03:34 PM
Change column color in chart when column value is over/under goal Excel Charts Charts and Charting in Excel 2 December 10th 07 11:08 PM
How can I change column numbers back to column letters? Space Elf Excel Worksheet Functions 3 March 2nd 06 09:35 PM
How do I change column into lines on a Line-Column chart? Ken Charts and Charting in Excel 1 March 17th 05 02:29 PM
Change the width of a single column in a column chart Dave Charts and Charting in Excel 2 December 13th 04 07:25 PM


All times are GMT +1. The time now is 02:43 PM.

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

About Us

"It's about Microsoft Excel"