PDA

View Full Version : Repeating Format Automatically On Scrolling Down To New Page



testingcode
07-11-2013, 05:12 PM
Hello,

I need some help in repeating a format automatically. I'm using a spreadsheet that you view in Page View and I would like to repeat the same page when you scroll down to the next page.

I've already tried the print rows feature, but that doesn't allow me to enter data into the printed cells. I need the cells along with their borders to be copied over automatically, but yet still be editable.

I've tried to look at templates, but I don't think that's the solution for me.

Any help is appreciated, and of course I'm willing to try to elaborate if my question doesn't quite make much sense.

Thanks.

Excel Fox
07-11-2013, 08:16 PM
So if I understand correctly, each of your pages would be say around 45-50 rows in height, and by scrolling you mean moving the cursor down the sheet using the arrow button on the keyboard (and not just dragging the vertical bar down, cause that doesn't move the cursor, and in turn there's no trigger event to it). And the moment the cursor reaches the next page, you want the border from the first sheet to be exactly copied over to the page you are on now. Am I guessing your objective correctly?

testingcode
07-11-2013, 08:50 PM
So if I understand correctly, each of your pages would be say around 45-50 rows in height, and by scrolling you mean moving the cursor down the sheet using the arrow button on the keyboard (and not just dragging the vertical bar down, cause that doesn't move the cursor, and in turn there's no trigger event to it). And the moment the cursor reaches the next page, you want the border from the first sheet to be exactly copied over to the page you are on now. Am I guessing your objective correctly?

I don't think so.

Here's a picture of what I need repeated for each page:
976

I have the "Header" and "places" as repeated print rows, but I need the info tables to repeat each time I go to a next page as well. I can fit seven of the info tables on one page after the printed rows (Header and places).

Basically, I do not want to copy/paste the info tables each time I need a new page. I want it to automatically have the tables be there just like the printed lines, but while still having the ability to enter information into them.

Excel Fox
07-11-2013, 09:55 PM
That's analogous to what I said. Instead of the borders, you are just keeping a replica of an entire area of cells for each sheet, apart from the print title rows.

testingcode
07-11-2013, 10:00 PM
That's analogous to what I said. Instead of the borders, you are just keeping a replica of an entire area of cells for each sheet, apart from the print title rows.

My apologies, that's correct.

Excel Fox
07-11-2013, 10:20 PM
Try this...

When you reach the 3rd row of each page, the code will automatically copy the RangeToCopy that is in the hidden sheet within the workbook. This assumes that each of your page has 46 rows.


Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)

If Target.Row Mod 45 = 3 Then
If IsEmpty(Target) Then
Worksheets("Sheet1").Range("RangeToCopy").Copy Sh.Cells(Target.Row, 1)
End If
End If

End Sub

testingcode
07-11-2013, 11:23 PM
**EDIT**

Got it to work after a little fiddling. Thank you for all the help. It's greatly appreciated!

Excel Fox
07-11-2013, 11:47 PM
Congratulations. Glad it was what you were hoping for.