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)
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
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
-
“kill switches” found in Chinese made power inverters
by
Alex5723
1 hour, 25 minutes ago -
Windows 11 – InControl vs pausing Windows updates
by
Kathy Stevens
1 hour, 51 minutes ago -
Meet Gemini in Chrome
by
Alex5723
2 hours, 53 minutes ago -
DuckDuckGo’s Duck.ai added GPT-4o mini
by
Alex5723
3 hours, 1 minute ago -
Trump signs Take It Down Act
by
Alex5723
11 hours ago -
Do you have a maintenance window?
by
Susan Bradley
2 hours, 14 minutes ago -
Freshly discovered bug in OpenPGP.js undermines whole point of encrypted comms
by
Nibbled To Death By Ducks
2 hours, 16 minutes ago -
Cox Communications and Charter Communications to merge
by
not so anon
14 hours, 20 minutes ago -
Help with WD usb driver on Windows 11
by
Tex265
19 hours, 29 minutes ago -
hibernate activation
by
e_belmont
23 hours, 15 minutes ago -
Red Hat Enterprise Linux 10 with AI assistant
by
Alex5723
1 day, 3 hours ago -
Windows 11 Insider Preview build 26200.5603 released to DEV
by
joep517
1 day, 6 hours ago -
Windows 11 Insider Preview build 26120.4151 (24H2) released to BETA
by
joep517
1 day, 6 hours ago -
Fixing Windows 24H2 failed KB5058411 install
by
Alex5723
2 hours, 13 minutes ago -
Out of band for Windows 10
by
Susan Bradley
1 day, 10 hours ago -
Giving UniGetUi a test run.
by
RetiredGeek
1 day, 17 hours ago -
Windows 11 Insider Preview Build 26100.4188 (24H2) released to Release Preview
by
joep517
2 days, 1 hour ago -
Microsoft is now putting quantum encryption in Windows builds
by
Alex5723
2 hours, 17 minutes ago -
Auto Time Zone Adjustment
by
wadeer
2 days, 5 hours ago -
To download Win 11 Pro 23H2 ISO.
by
Eddieloh
2 days, 3 hours ago -
Manage your browsing experience with Edge
by
Mary Branscombe
3 hours, 4 minutes ago -
Fewer vulnerabilities, larger updates
by
Susan Bradley
20 hours, 37 minutes ago -
Hobbies — There’s free software for that!
by
Deanna McElveen
1 day, 3 hours ago -
Apps included with macOS
by
Will Fastie
1 day ago -
Xfinity home internet
by
MrJimPhelps
21 hours, 40 minutes ago -
Convert PowerPoint presentation to Impress
by
RetiredGeek
1 day, 22 hours ago -
Debian 12.11 released
by
Alex5723
3 days, 3 hours ago -
Microsoft: Troubleshoot problems updating Windows
by
Alex5723
3 days, 6 hours ago -
Woman Files for Divorce After ChatGPT “Reads” Husband’s Coffee Cup
by
Alex5723
2 days, 10 hours ago -
Moving fwd, Win 11 Pro,, which is best? Lenovo refurb
by
Deo
2 hours, 28 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.