Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How would I 'paginate' every X row into a new column?

ORIGINAL LIST
Col A
-----
1
2
3
4
5
6
7
8
9
10

Is there a way to break after every third item? Turning the list into this:

PAGINATED LIST
Col A   Col B   Col C   Col D
-----   -----   -----   -----    
1       4       7       10
2       5       8
3       6       9
share|improve this question
    
Actually, I only need this for the printed result. –  David Andersson Jun 4 '12 at 11:43
2  
This is a good question, so why the downvotes? It is a good habit to explain when downvoting. So come on. –  Zeemee Jun 4 '12 at 13:18
add comment

1 Answer 1

up vote 2 down vote accepted

Here's one way to do it.

In the example below, I placed the transformed range beside the original list (A1:A15).

In B1, enter this formula, and then copy it down and across:

=INDEX(original,((COLUMNS($B:B)-1)*3)+ROW(),1)

Where
original refers to A1:15

enter image description here

Just do a quick copy-paste-values move and then delete the original column. You could use another sheet for this.

share|improve this answer
    
Thanks! I ended up using your formula in a separate sheet, starting in column B. I then changed the hard-coded *3 into *COUNTIF(A$1:A$2000, ">0") to have it handle dynamic number of rows. –  David Andersson Jun 4 '12 at 14:22
1  
Glad to help. Welcome to SuperUSer! –  Ellesa Jun 4 '12 at 14:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.