Problem with collumns and pages...

Cactus

New Member
Joined
Apr 18, 2006
Messages
1
I have a file that's about 50 000 rows long, and 4 collumns wide. And this whould work just fine, but I would not like to print a little over 700 pages... So now I've tried to change the sheet so that I could get 9 collumns on every page (insted of 4). So that I could get two of the old pages on one page (with one empty row between them... It's hard to explain but here is a little ASCII pic that might give you a hint.
OLD (about 700 pages):
| | | |
| | | |
| | | |
| | | |

NEW(about 350 pages):
| | | |-| | | |
| | | |-| | | |
| | | |-| | | |
| | | |-| | | |

(Both "pictures" are just one page)
(the "-" are the empty row)

And now I just can't figure aout how to get the job done in a easy way... Thanks!
PS. The order must stay the same, I can not take the second half of the rows and paste them beside the first half of the rows...
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Here is a similar way but with more efficient formulas.

Original list is in columns A & B (but the sheet can easily be modified for 3, 4 etc columns to be re-aligned for printing).

1. C2: =COUNTA($A1:B1) however this cell could have the number of columns entered manually.
2. C4: =MAX(D:D)
3. Set up column D and the rest of row 1 for the grid layout you want. Clearly the numbers in row 1 need to be a multiple of the C2 value.
4. Set up grid headings in row 2.
5. Formula in E3 (copied across and down) is:
=IF(INDEX($A:$B,1+$C$4*INT((E$1-1)/$C$2)+$D3,1+MOD(E$1-1,$C$2))="","",INDEX($A:$B,1+$C$4*INT((E$1-1)/$C$2)+$D3,1+MOD(E$1-1,$C$2)))
6. Set print area to E2:H11 (adjust range to suit your data)
Long Columns.xls
ABCDEFGH
1ItemPriceNo Cols1234
2Item 11.002ItemPriceItemPrice
3Item 21.50Max D1Item 11.00Item 105.50
4Item 32.0092Item 21.50Item 11148.00
5Item 42.503Item 32.00Item 122.36
6Item 53.004Item 42.50Item 1314.00
7Item 63.505Item 53.00Item 1458.00
8Item 74.006Item 63.50Item 15 
9Item 80.007Item 74.00Item 16 
10Item 95.008Item 80.00Item 172.00
11Item 105.509Item 95.00Item 18 
12Item 11148.00
13Item 122.36
14Item 1314.00
15Item 1458.00
16Item 15
17Item 16
18Item 172.00
19Item 18
Long Columns
 
Upvote 0
thanks so much for your help, guys. appreciate it. i'll try both and see which one works best for me.
 
Upvote 0
I can't quite work out the formula. I have two columns of info, A and B and then many rows, beginning at Row 1. I'm confused with the C2 and C4 references (figured i should put those formulas in C2 and C4 and did), but this: "Set up column D and the rest of row 1 for the grid layout you want. Clearly the numbers in row 1 need to be a multiple of the C2 value." i don't know what that means. can you dumb it down a little for me please. Thank you,
 
Upvote 0
I can't quite work out the formula. I have two columns of info, A and B and then many rows, beginning at Row 1. I'm confused with the C2 and C4 references (figured i should put those formulas in C2 and C4 and did), but this: "Set up column D and the rest of row 1 for the grid layout you want. Clearly the numbers in row 1 need to be a multiple of the C2 value." i don't know what that means. can you dumb it down a little for me please. Thank you,
OK, let's try.

You have two columns in columns A and B, just like in my sample above. Just to make it a bit easier to follow from the example above, I suggest that you put in a new row 1 above your data (select A1 then Insert|Rows), so that your data starts in row 2 like my sample.

Put a 2 in C2 and the formula suggested in C4.

Let's suppose you want six columns on each page. So in E1 across to J1, put 1,2,3,4,5,6. I don't know how many rows you have but in D3 put a 1 and in D4 put a 2. Now select D1:D2 and drag the Fill handle (the little black square at the bottom right of the selection) down some distance.

Now copy this formula
=IF(INDEX($A:$B,1+$C$4*INT((E$1-1)/$C$2)+$D3,1+MOD(E$1-1,$C$2))="","",INDEX($A:$B,1+$C$4*INT((E$1-1)/$C$2)+$D3,1+MOD(E$1-1,$C$2)))
and paste it into E3.

Select E3 and drag the Fill Handle across to J3. Now select E3:J3 and drag the Fill Handle down as far as you put numbers in column D.

If this does not bring all your data from columns A and B into columns E:J then drag the numbers down further in column D and the formulas down in columns E:J

Set your print area (File|Page Setup...|Sheet tab) to E3:Jxx where xx is the last row of data showing in columns E:J

See how that goes.
 
Upvote 0
that didn't work and i did exactly how you said. however i think i might have an idea of what when wrong. In this instruction:

Let's suppose you want six columns on each page. So in E1 across to J1, put 1,2,3,4,5,6. I don't know how many rows you have but in D3 put a 1 and in D4 put a 2. Now select D1:D2 and drag the Fill handle.

When I select and drag/filled D1:D2 down, that meant I overwrote what you just had me put in D3 and D4 (1 and 2 respectively). you can't have had me done that for nothing. so perhaps i'm supposed to select / drag and fill somewhere else????
 
Upvote 0
that didn't work and i did exactly how you said. however i think i might have an idea of what when wrong. In this instruction:

Let's suppose you want six columns on each page. So in E1 across to J1, put 1,2,3,4,5,6. I don't know how many rows you have but in D3 put a 1 and in D4 put a 2. Now select D1:D2 and drag the Fill handle.

When I select and drag/filled D1:D2 down, that meant I overwrote what you just had me put in D3 and D4 (1 and 2 respectively). you can't have had me done that for nothing. so perhaps i'm supposed to select / drag and fill somewhere else????
Sorry, my mistake :oops:

Should have been:
... in D3 put a 1 and in D4 put a 2. Now select D3:D4 and drag the Fill handle.

At the end of the day it should look like the sample I posted - apart from there being six columns instead of four. :biggrin:
 
Upvote 0
i redid it and it's still not working for me. All the cells from E3:J476 say: #DIV/0!
 
Upvote 0
Roni

I sent you a PM regarding this. Did you get it? Or have you resolved the issue satisfactorily?
 
Upvote 0

Forum statistics

Threads
1,214,644
Messages
6,120,709
Members
448,983
Latest member
Joaquim_Baptista

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top