ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Sequential Numbers (https://www.excelbanter.com/excel-discussion-misc-queries/215755-sequential-numbers.html)

LiAD

Sequential Numbers
 
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

Sequential Numbers
 
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

On Jan 8, 1:01*pm, LiAD wrote:
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.



LiAD

Sequential Numbers
 
Yeah its the macro i can't do.

Would you have any ideas for it?

"Pete_UK" wrote:

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

On Jan 8, 1:01 pm, LiAD wrote:
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

Sequential Numbers
 
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

On Jan 8, 1:40*pm, LiAD wrote:
Yeah its the macro i can't do.

Would you have any ideas for it?



"Pete_UK" wrote:
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


On Jan 8, 1:01 pm, LiAD wrote:
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.- Hide quoted text -


- Show quoted text -



LiAD

Sequential Numbers
 
perfect

thanks a lot

"Pete_UK" wrote:

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

On Jan 8, 1:40 pm, LiAD wrote:
Yeah its the macro i can't do.

Would you have any ideas for it?



"Pete_UK" wrote:
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


On Jan 8, 1:01 pm, LiAD wrote:
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.- Hide quoted text -


- Show quoted text -




Pete_UK

Sequential Numbers
 
You're welcome - thanks for feeding back.

Pete

On Jan 8, 3:32*pm, LiAD wrote:
perfect

thanks a lot



"Pete_UK" wrote:
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


On Jan 8, 1:40 pm, LiAD wrote:
Yeah its the macro i can't do.


Would you have any ideas for it?


"Pete_UK" wrote:
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


On Jan 8, 1:01 pm, LiAD wrote:
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.- Hide quoted text -


- Show quoted text -- Hide quoted text -


- Show quoted text -




All times are GMT +1. The time now is 02:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com