Several times a day I need to produce packing slips for tractor trailer loads of product shipped on pallets. There are usually 20 – 30+ packing slips for each load, one for each pallet, with one customer requiring two slips per pallet. The slips are numbered 1 of ___, 2 of ___, 3 of ___, etc. Is there a formula or macro that would make my job easier than manually entering the first number? (The “total” number is entered with a formula)
![]() |
There are isolated problems with current patches, but they are well-known and documented on this site. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Setting up pagination (2002 / rel 10)
Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Setting up pagination (2002 / rel 10)
- This topic has 21 replies, 3 voices, and was last updated 16 years, 11 months ago.
Viewing 1 reply threadAuthorReplies-
WSHansV
AskWoody Lounger -
WSk32rem
AskWoody Lounger -
WSHansV
AskWoody LoungerNovember 29, 2007 at 6:50 pm #1086263Make sure that the workbook is less than 100 KB. If it’s too big, create a zip file containing the workbook.
Below the area where you type a post or reply, there is a box labeled “Attach a file – 100k Max.”, with a Browse… button next to it. Just before clicking Post It, click the Browse… button and select the workbook or zip file. It will appear as an attachment to your reply.
-
-
WSk32rem
AskWoody Lounger-
WSHansV
AskWoody LoungerNovember 29, 2007 at 10:36 pm #1086304Thanks – the attachment worked. The situation is different from what I thought it was. You can use the following macro to print out slips; the macro looks at the value calculated in cell E28 and fills cell C28 with values 1, 2, …, etc. up to that value, and prints out the sheet for each value. You can specify multiple copies of each to be printed if you wish.
Sub PrintSlips()
Dim i As Integer
Dim n As Integer
n = Range("E28")
For i = 1 To n
Range("C28") = i
ActiveSheet.PrintOut Copies:=1 ' change if needed
Next i
End Sub -
WSk32rem
AskWoody Lounger -
WSk32rem
AskWoody Lounger -
WSHansV
AskWoody Lounger -
WSk32rem
AskWoody LoungerDecember 11, 2007 at 5:55 pm #1087824 -
WSHansV
AskWoody Lounger -
WSk32rem
AskWoody Lounger -
WSHansV
AskWoody LoungerDecember 12, 2007 at 3:42 pm #1088004 -
WSk32rem
AskWoody Lounger -
WSk32rem
AskWoody LoungerJanuary 4, 2008 at 8:50 pm #1091186OK, I’m back again. The pagination is working well with the two sheets on one page. Now I’m wondering if there is a way to have the top sheet number for the first half of the number of sheets needed and the bottom sheet number the last half? That would save me collating after they’re printed. Thanks!
-
WSHansV
AskWoody Lounger -
WSk32rem
AskWoody Lounger -
WSkiazd
AskWoody LoungerMay 29, 2008 at 10:36 pm #1110895This is a very interesting use of VBA and I have learned a great deal. One question though. If a person does not buy an even number (E22), how can you get the lower portion to print the correct number? For example if the client buys 57 items the top portion prints 1 of 57, the lower portion 29.5 of 57. Is the only alternative to make sure the client buys an even number
-
WSHansV
AskWoody LoungerMay 29, 2008 at 10:55 pm #1110898You could change the code as follows:
Sub PrintSlips()
Dim i As Integer
Dim n As Integer
n = Range("E22")
For i = 1 To (n + 1) 2
Range("C22") = i
Range("C49") = (n + 1) 2 + i
ActiveSheet.PrintOut Copies:=1 ' change if needed
Next i
End Sub
This will work for odd and even numbers. But because the total number of half pages is always even, you’ll get a superfluous last half page if the number in E22 is odd. You can simply discard that one.
-
-
-
-
WSk32rem
AskWoody LoungerMay 29, 2008 at 7:10 pm #1110848Okay, this macro worked great – up until today. If I specify more than one copy to be printed, I get an error on the second sheet as follows:
PCL XL error
Subsystem: KERNEL
Error: IllegalOperatorSequence
Operator: EndChar
Position: 47I have not made any changes to any of the files I set up using this macro. I edited the macro in one or two of the other files, changing the copies desired to “2” just to see if it was a problem with just one file. Any time I changed the copies desired to more than one, I got the above error message printed on the second page of the print out. Please advise. Thank you.
-
WSHansV
AskWoody LoungerMay 29, 2008 at 9:46 pm #1110869The error message that you mention is a printer driver error (in fact, a PCL 6 error), not an Excel error. See if there’s an updated driver for your printer. If not, you might check whether there’s a PCL 5 or PostScript driver for your printer – PCL 5 and PostScript are less “sensitive” then PCL 6.
-
WSk32rem
AskWoody Lounger
-
-
Viewing 1 reply thread -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
KB5058379 / KB 5061768 Failures
by
crown
6 hours, 3 minutes ago -
Windows 10 23H2 Good to Update to ?
by
jkitc
8 hours, 42 minutes ago -
At last – installation of 24H2
by
Botswana12
9 hours, 27 minutes ago -
MS-DEFCON 4: As good as it gets
by
Susan Bradley
2 hours, 29 minutes ago -
RyTuneX optimize Windows 10/11 tool
by
Alex5723
21 hours, 39 minutes ago -
Can I just update from Win11 22H2 to 23H2?
by
Dave Easley
14 hours, 58 minutes ago -
Limited account permission error related to Windows Update
by
gtd12345
1 day, 11 hours ago -
Another test post
by
gtd12345
1 day, 11 hours ago -
Connect to someone else computer
by
wadeer
1 day, 5 hours ago -
Limit on User names?
by
CWBillow
1 day, 8 hours ago -
Choose the right apps for traveling
by
Peter Deegan
22 hours, 38 minutes ago -
BitLocker rears its head
by
Susan Bradley
6 hours, 39 minutes ago -
Who are you? (2025 edition)
by
Will Fastie
5 hours, 36 minutes ago -
AskWoody at the computer museum, round two
by
Will Fastie
1 day, 1 hour ago -
A smarter, simpler Firefox address bar
by
Alex5723
1 day, 21 hours ago -
Woody
by
Scott
2 days, 6 hours ago -
24H2 has suppressed my favoured spider
by
Davidhs
6 hours, 16 minutes ago -
GeForce RTX 5060 in certain motherboards could experience blank screens
by
Alex5723
2 days, 21 hours ago -
MS Office 365 Home on MAC
by
MickIver
2 days, 14 hours ago -
Google’s Veo3 video generator. Before you ask: yes, everything is AI here
by
Alex5723
3 days, 11 hours ago -
Flash Drive Eject Error for Still In Use
by
J9438
6 hours, 1 minute ago -
Windows 11 Insider Preview build 27863 released to Canary
by
joep517
4 days, 6 hours ago -
Windows 11 Insider Preview build 26120.4161 (24H2) released to BETA
by
joep517
4 days, 6 hours ago -
AI model turns to blackmail when engineers try to take it offline
by
Cybertooth
3 days, 9 hours ago -
Migrate off MS365 to Apple Products
by
dmt_3904
3 days, 10 hours ago -
Login screen icon
by
CWBillow
3 days ago -
AI coming to everything
by
Susan Bradley
15 hours, 29 minutes ago -
Mozilla : Pocket shuts down July 8, 2025, Fakespot shuts down on July 1, 2025
by
Alex5723
4 days, 21 hours ago -
No Screen TurnOff???
by
CWBillow
4 days, 22 hours ago -
Identify a dynamic range to then be used in another formula
by
BigDaddy07
2 hours, 23 minutes ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.