Consecutive numbering using VBA

litestream

Active Member
Joined
Jul 24, 2006
Messages
323
I have 2 worksheets - called "Data" and "Labels"

The "Label" worksheet is in fact a label which is affixed to a pallet for delivery. Each label says "pallet x of y" where "y" is the total number of pallets and "x" is the number of the pallet.

"x" is a fixed number which I enter into cell A1 of the "Data" worksheet (usually 1 unless I have to stop the printing and resume at a later time)

"y" is the total number of pallets for the delivery and is taken from cell B1 of the "Data" worksheet but is the result of a formula which works out the number of items on each pallet.

On the "Label" worksheet, cell C1 is the pallet number and C3 is the total number of pallets

How can I print out consecutive numbered labels? I know it's part of a "for next loop" but I'm unsure how to do this in VBA.

Any assistance would be greatly appreciated.
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Forum statistics

Threads
1,136,926
Messages
5,678,606
Members
419,775
Latest member
joh93

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top