Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Sequential Numbers

48 views
Skip to first unread message

LiAD

unread,
Jan 8, 2009, 8:01:00 AM1/8/09
to
Good afternoon,

I have 4 tables within one sheet in one excel file which i need to print 50
times to get a total of 200. I need to put a unique number in each table
preferably from 1-200. The numbers are required to go into cells S6, AS6,
S59 and AS59. So numbers 1-4 will be on the first sheet printed, (one number
per
table that is), 5-9 on the second page etc.

I would rather not have to copy the table 200 times and write in each
number. Is there a way that i can do this automatically or ask excel to add
4 to each number from the previous page for every page it prints etc?

Thanks for any help or suggestions.

Pete_UK

unread,
Jan 8, 2009, 8:18:18 AM1/8/09
to
You can link cells AS6, S59 and AS59 to S6 with a simple formula:

AS6: =S6+1
S59: =S6+2
AS59: =S6+3

where S6 starts off with a value of 1.

Then it should be relatively easy to set up a macro to print your
sheet 50 times within a loop, and each time it increments the value in
S6 by 4.

Hope this helps.

Pete

LiAD

unread,
Jan 8, 2009, 8:40:13 AM1/8/09
to
Yeah its the macro i can't do.

Would you have any ideas for it?

Pete_UK

unread,
Jan 8, 2009, 9:33:20 AM1/8/09
to
Assuming you have set up your Print Area, this should do it:

Sub Marine()
' Pete Ashurst, 08/01/2009
'
Range("S6").Value = 1
For i = 1 To 50
ActiveWindow.SelectedSheets.PrintOut _
Copies:=1, Collate:=True
Range("S6").Value = Range("S6").Value + 4
Next i
End Sub

S6 will contain 201 at the end of the macro.

Hope this helps.

Pete

> > > Thanks for any help or suggestions.- Hide quoted text -
>
> - Show quoted text -

LiAD

unread,
Jan 8, 2009, 10:32:15 AM1/8/09
to
perfect

thanks a lot

Pete_UK

unread,
Jan 8, 2009, 10:39:09 AM1/8/09
to
You're welcome - thanks for feeding back.

Pete

> > > - Show quoted text -- Hide quoted text -

0 new messages