Auto fill based on another cell value

gta1216

Board Regular
Joined
Apr 23, 2016
Messages
63
I am not sure if this was asked before. I tried searching, but didn't find any. Maybe I'm searching by wrong keywords.

I have an excel sheet where F9 and F10 is blank. When printed on paper, it should show # / #. Imagine Microsoft Word setup with page numbering.

Depending on the project we are working on, the value in F10 can be any number, say the value is 3. I need to print 3 pages showing 1/3 in 1st page, 2/3 in 2nd page, 3/3 in 3rd page on the specific cell. I would like to setup a macro so that if I enter 3 in F10, it'll auto fill F9 with 1,2,3..., and it'll also print 3 pages (depends on the value in F10). Does anyone know how to set it up?
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Use this to print sheet

Code:
Sub Print_Sheet()
    For i = 1 To Range("F10").Value
        Range("F9").Value = i
        ActiveSheet.PrintOut
    Next
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,159
Members
453,021
Latest member
Justyna P

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
Back
Top