0

I have long file with this content:

John Doe1
Street Foo 35
New York
Mary Johnson
Street Foo 49
Los Angeles
Robert Deniro
Street Bar 47
Washington
...

As you can see there is one column with Name, Address, Town, Name, Address, Town..

I would like to convert it automatically to a file with 3 colums:

John Doe1        Street Foo 35     New York
Mary Johnson     Street Foo 49     Los Angeles
Robert Deniro    Street Bar 47     Washington
...

Is that possible?

Excel 2007/Windows 7

tirenweb
  • 30,963
  • 73
  • 183
  • 303

2 Answers2

1

Based on this similar answer, and assuming your data lays in A1:A50 (you can extend this range in the formulas below as needed), then:

Cell B1: =INDEX($A$1:$A$50,ROW()*3-2,1)

Cell C1: =INDEX($A$1:$A$50,ROW()*3-1,1)

Cell D1: =INDEX($A$1:$A$50,ROW()*3,1)

This gives you one line of rearranged data. Copy B1:D1 downwards, as far as needed.

enter image description here

Community
  • 1
  • 1
0

I am sure answered many times (and in different ways) on SO already but since I can't presently find an example you might try:

Add a column with =MOD(ROW(),3) copied down to suit and convert to values. Copy your data column twice, deleting top cell from first copy and top two cells from second. Filter to delete rows other than with 1 in what was the MOD column.

pnuts
  • 58,317
  • 11
  • 87
  • 139