Sequential Numbers

  • Thread starter Thread starter LiAD
  • Start date Start date
L

LiAD

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.
 
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
 
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
 
perfect

thanks a lot

Pete_UK said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top