Can anyone help me!!?
I have a table which is exported into excel from Microsoft Access 2000.
The table includes student details with the first colum being the Centre they are studying at followed by the rest of their details in the preceding columns.
What I am trying to acheive is a procedure which I can run each time I export this Spreadsheet to Excel that will automatically insert a page break and a new row when the Centre Name in the first column changes. so that the student from the centres can be grouped together.
I had a look at the help files and I know to enter a page break you would use the foolwing code:-
worksheets ("Sheet1"
.Row(25).pagebreak = xlPagebreakManual
However this seems to me that you will need to know the row number that a page break is needed. Whereas I need to enter it whenever the Centre name changes. So I need some sort of comparison of the rows in colum 1, 1 by 1 and when they are different insert a page break.
I need help in coding this.
Solving this would be of so much help and will be greatly appreciated.
I have not really used vba in excel, only access. I know they are virtually the same but please help.
Thanks in advance.
Neemi
I have a table which is exported into excel from Microsoft Access 2000.
The table includes student details with the first colum being the Centre they are studying at followed by the rest of their details in the preceding columns.
What I am trying to acheive is a procedure which I can run each time I export this Spreadsheet to Excel that will automatically insert a page break and a new row when the Centre Name in the first column changes. so that the student from the centres can be grouped together.
I had a look at the help files and I know to enter a page break you would use the foolwing code:-
worksheets ("Sheet1"
However this seems to me that you will need to know the row number that a page break is needed. Whereas I need to enter it whenever the Centre name changes. So I need some sort of comparison of the rows in colum 1, 1 by 1 and when they are different insert a page break.
I need help in coding this.
Solving this would be of so much help and will be greatly appreciated.
I have not really used vba in excel, only access. I know they are virtually the same but please help.
Thanks in advance.
Neemi