Looking for a macro to automatically generate numbers in "cut-stack" order...

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi,

I need to create a macro which will automatically number a range of
tickets in "cut-stack" order. Another way this might be worded is,
given "nnn" sheets of paper, the order of each ticket number is
sequential on each subsequent sheet of paper. When the paper is cut the
stacks can be placed on top of each order to get a complete set of
numbered tickets.

For example, to number from 1 to 200 in stacks of 8, the first page
contains the following sequence of numbers:
1, 26, 51, 76, 101, 126, 151, 176
and the second page contains the following sequence of numbers:
2, 27, 52, 77, 102, 127, 152, 177
and the third page contains the following sequence of numbers:
3, 28, 53, 78, 103, 128, 153, 178
etc...

To get things started, I have defined the following cells in my current
worksheet:

A1=Calc_Num1
B1=Num1
C1=Start_Number
D1=Stop_Number
E1=N-up
F1=Increment

A2=C2
B2=RIGHT("0000"&A2,4)
C2=1
D2=200
E2=8
F2=ROUND((D2-C2)/E2,0)

A3=ROUND(D2/E2,0)+1
B3=RIGHT("0000"&A3,4)

A4=(A3+F2)
B4=RIGHT("0000"&A4,4)

A5=(A4+F2)
B5=RIGHT("0000"&A5,4)

A6=(A5+F2)
B6=RIGHT("0000"&A6,4)

A7=(A6+F2)
B7=RIGHT("0000"&A7,4)

A8=(A7+F2)
B8=RIGHT("0000"&A8,4)

A9=(A8+F2)
B9=RIGHT("0000"&A9,4)

A10=A2+1
B10=RIGHT("0000"&A10,4)

A11=A3+1
B11=RIGHT("0000"&A11,4)

The above formula is copied upto and including A201 and B201
respectively.

In the macro, I want to be prompted for the Start_Number, Stop_Number
and N-up cells in turn the macro will automatically populate all
required cells. Any assistance you can provide would be greatly
appreciated.

-Greg

.



Relevant Pages

  • Re: Code to stop a Macro
    ... of the sequence of sheets you can put the following code between each ... If you want the possibility to skip single sheets in the middle of the ... You should also include some more useful information than just "next ... in the code I would like to stop the Macro with a Message Box and ask if I ...
    (microsoft.public.excel.programming)
  • Re: Code to stop a Macro
    ... If the sheet or sheets that you want to skip are always the at the end ... of the sequence of sheets you can put the following code between each ... You should also include some more useful information than just "next ... in the code I would like to stop the Macro with a Message Box and ask if I ...
    (microsoft.public.excel.programming)
  • Re: Comma delimited output for comments
    ... Now is there a way to run that macro on a whole ... sequence of Excel files, or sheets? ...
    (microsoft.public.excel.misc)
  • Re: Hunter builds
    ... start over the sequence." ... What happens on third press a few ms ... keep pressing it, it'll fire steady, auto, steady, auto forever. ... To be honest, it's not strictly necessary in THIS macro, because there's ...
    (alt.games.warcraft)
  • Re: Automating Seq Field Code Ticket Numbering
    ... > Then run a macro containing the following code when that document is active. ... It will start numbering tickets from ... >> Helen Bradley on using numbering tickets and ticket stubs using field code ...
    (microsoft.public.word.vba.general)