Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default Automatic page breaks and formulas

I have a big report at work due every Tuesday that requires me to take
between 4,000 and 5,000 rows of information from Access and export them to
Excel.

My problem is that since this is an HR report, it needs to be divided by
department of which there are about 170 them. I need a page break after each
one.

Also, I have formulas that calculate the percentage of employees in each
department who have completed certain training.

What is the best way to do this? The powers that be do not like the look of
the page if I use the subtotal feature.

Currently, after I export the report to Excel, I go through and manually add
page breaks after each department and at the same time add the formulas. It
takes about four hours to do this manually.

Help?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 13
Default Automatic page breaks and formulas

If you keep the information in Access you could create a report that was a
lot easier to format than in Excel. You can create all the subtotals etc
that you need and have full control over how they appear. You can also force
a new page for each group, if the whole group won't fit on the remainder of
the page. If you are looking for presentation and not just raw facts and
figures, Access is the way to go - unless you have a lot of statistical
calculations to do. Even then it would be very simple to reimport it into
Access once you have done the statistical acrobats in Excel.

"randlesc" wrote:

I have a big report at work due every Tuesday that requires me to take
between 4,000 and 5,000 rows of information from Access and export them to
Excel.

My problem is that since this is an HR report, it needs to be divided by
department of which there are about 170 them. I need a page break after each
one.

Also, I have formulas that calculate the percentage of employees in each
department who have completed certain training.

What is the best way to do this? The powers that be do not like the look of
the page if I use the subtotal feature.

Currently, after I export the report to Excel, I go through and manually add
page breaks after each department and at the same time add the formulas. It
takes about four hours to do this manually.

Help?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default Automatic page breaks and formulas

Sorry, but I've been told by the administrator of the hospital that it must
be in Excel. I have tried to argue the advantages of it being in Access but
administration remains firm that it be an Excel report.

So, can anyone help?

BTW, I didn't mention but perhaps I didn't need to, the number of employees
changes weekly, both up and down.

"Geoff_L" wrote:

If you keep the information in Access you could create a report that was a
lot easier to format than in Excel. You can create all the subtotals etc
that you need and have full control over how they appear. You can also force
a new page for each group, if the whole group won't fit on the remainder of
the page. If you are looking for presentation and not just raw facts and
figures, Access is the way to go - unless you have a lot of statistical
calculations to do. Even then it would be very simple to reimport it into
Access once you have done the statistical acrobats in Excel.

"randlesc" wrote:

I have a big report at work due every Tuesday that requires me to take
between 4,000 and 5,000 rows of information from Access and export them to
Excel.

My problem is that since this is an HR report, it needs to be divided by
department of which there are about 170 them. I need a page break after each
one.

Also, I have formulas that calculate the percentage of employees in each
department who have completed certain training.

What is the best way to do this? The powers that be do not like the look of
the page if I use the subtotal feature.

Currently, after I export the report to Excel, I go through and manually add
page breaks after each department and at the same time add the formulas. It
takes about four hours to do this manually.

Help?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Automatic page breaks and formulas

This macro will take care of the pagebreaks.

Not enough info to look after formulas but prolly can be done.

Sub InsertBreak_At_Change()
Dim I As Long
For I = Columns(1).Rows.Count To 1 Step -1
If Selection(I).Row = 1 Then Exit Sub
If Selection(I) < Selection(I - 1) And Not IsEmpty _
(Selection(I - 1)) Then
With Selection(I)
.PageBreak = xlPageBreakManual
End With
End If
Next
End Sub

Assumes the names are in column A.

Select the column range then run the macro.


Gord Dibben MS Excel MVP


On Mon, 2 Nov 2009 07:02:02 -0800, randlesc
wrote:

Sorry, but I've been told by the administrator of the hospital that it must
be in Excel. I have tried to argue the advantages of it being in Access but
administration remains firm that it be an Excel report.

So, can anyone help?

BTW, I didn't mention but perhaps I didn't need to, the number of employees
changes weekly, both up and down.

"Geoff_L" wrote:

If you keep the information in Access you could create a report that was a
lot easier to format than in Excel. You can create all the subtotals etc
that you need and have full control over how they appear. You can also force
a new page for each group, if the whole group won't fit on the remainder of
the page. If you are looking for presentation and not just raw facts and
figures, Access is the way to go - unless you have a lot of statistical
calculations to do. Even then it would be very simple to reimport it into
Access once you have done the statistical acrobats in Excel.

"randlesc" wrote:

I have a big report at work due every Tuesday that requires me to take
between 4,000 and 5,000 rows of information from Access and export them to
Excel.

My problem is that since this is an HR report, it needs to be divided by
department of which there are about 170 them. I need a page break after each
one.

Also, I have formulas that calculate the percentage of employees in each
department who have completed certain training.

What is the best way to do this? The powers that be do not like the look of
the page if I use the subtotal feature.

Currently, after I export the report to Excel, I go through and manually add
page breaks after each department and at the same time add the formulas. It
takes about four hours to do this manually.

Help?


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default Automatic page breaks and formulas

Thanks. This will help a lot. I'm assuming Column A is represented the
numeral 1 in the third line?

The formulas are percentages placed adjacent to the data. For example,
Column C has the data, Column D is the percentage.

My example would be H, I then J, K, then L, M

The formula is the same in each (with the only difference being the columns
in the range).

=(COUNTIF(H2:H68, "Yes"))/(COUNT(C2:C68))

This is from the first group of my report. (For what its worth, I've
noticed when I copy and past the end of the range updates correctly each
time, but the beginning seldom does and is usually only 4 or 5 away from the
end. )

Again, many thanks for your help.

Charles

"Gord Dibben" wrote:

This macro will take care of the pagebreaks.

Not enough info to look after formulas but prolly can be done.

Sub InsertBreak_At_Change()
Dim I As Long
For I = Columns(1).Rows.Count To 1 Step -1
If Selection(I).Row = 1 Then Exit Sub
If Selection(I) < Selection(I - 1) And Not IsEmpty _
(Selection(I - 1)) Then
With Selection(I)
.PageBreak = xlPageBreakManual
End With
End If
Next
End Sub

Assumes the names are in column A.

Select the column range then run the macro.


Gord Dibben MS Excel MVP


On Mon, 2 Nov 2009 07:02:02 -0800, randlesc
wrote:

Sorry, but I've been told by the administrator of the hospital that it must
be in Excel. I have tried to argue the advantages of it being in Access but
administration remains firm that it be an Excel report.

So, can anyone help?

BTW, I didn't mention but perhaps I didn't need to, the number of employees
changes weekly, both up and down.

"Geoff_L" wrote:

If you keep the information in Access you could create a report that was a
lot easier to format than in Excel. You can create all the subtotals etc
that you need and have full control over how they appear. You can also force
a new page for each group, if the whole group won't fit on the remainder of
the page. If you are looking for presentation and not just raw facts and
figures, Access is the way to go - unless you have a lot of statistical
calculations to do. Even then it would be very simple to reimport it into
Access once you have done the statistical acrobats in Excel.

"randlesc" wrote:

I have a big report at work due every Tuesday that requires me to take
between 4,000 and 5,000 rows of information from Access and export them to
Excel.

My problem is that since this is an HR report, it needs to be divided by
department of which there are about 170 them. I need a page break after each
one.

Also, I have formulas that calculate the percentage of employees in each
department who have completed certain training.

What is the best way to do this? The powers that be do not like the look of
the page if I use the subtotal feature.

Currently, after I export the report to Excel, I go through and manually add
page breaks after each department and at the same time add the formulas. It
takes about four hours to do this manually.

Help?


.



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default Automatic page breaks and formulas

Sorry, one more thing.

Just ran the macro and it said it can't execute in Break Mode. I'm not sure
what this means, I assumed it was the view, so I've changed the view several
times but no luck.

Suggestions.

"Gord Dibben" wrote:

This macro will take care of the pagebreaks.

Not enough info to look after formulas but prolly can be done.

Sub InsertBreak_At_Change()
Dim I As Long
For I = Columns(1).Rows.Count To 1 Step -1
If Selection(I).Row = 1 Then Exit Sub
If Selection(I) < Selection(I - 1) And Not IsEmpty _
(Selection(I - 1)) Then
With Selection(I)
.PageBreak = xlPageBreakManual
End With
End If
Next
End Sub

Assumes the names are in column A.

Select the column range then run the macro.


Gord Dibben MS Excel MVP


On Mon, 2 Nov 2009 07:02:02 -0800, randlesc
wrote:

Sorry, but I've been told by the administrator of the hospital that it must
be in Excel. I have tried to argue the advantages of it being in Access but
administration remains firm that it be an Excel report.

So, can anyone help?

BTW, I didn't mention but perhaps I didn't need to, the number of employees
changes weekly, both up and down.

"Geoff_L" wrote:

If you keep the information in Access you could create a report that was a
lot easier to format than in Excel. You can create all the subtotals etc
that you need and have full control over how they appear. You can also force
a new page for each group, if the whole group won't fit on the remainder of
the page. If you are looking for presentation and not just raw facts and
figures, Access is the way to go - unless you have a lot of statistical
calculations to do. Even then it would be very simple to reimport it into
Access once you have done the statistical acrobats in Excel.

"randlesc" wrote:

I have a big report at work due every Tuesday that requires me to take
between 4,000 and 5,000 rows of information from Access and export them to
Excel.

My problem is that since this is an HR report, it needs to be divided by
department of which there are about 170 them. I need a page break after each
one.

Also, I have formulas that calculate the percentage of employees in each
department who have completed certain training.

What is the best way to do this? The powers that be do not like the look of
the page if I use the subtotal feature.

Currently, after I export the report to Excel, I go through and manually add
page breaks after each department and at the same time add the formulas. It
takes about four hours to do this manually.

Help?


.

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Automatic page breaks and formulas

Don't know why you got into break mode but open VBE and RunReset.


Gord

On Mon, 2 Nov 2009 11:38:01 -0800, randlesc
wrote:

Sorry, one more thing.

Just ran the macro and it said it can't execute in Break Mode. I'm not sure
what this means, I assumed it was the view, so I've changed the view several
times but no luck.

Suggestions.

"Gord Dibben" wrote:

This macro will take care of the pagebreaks.

Not enough info to look after formulas but prolly can be done.

Sub InsertBreak_At_Change()
Dim I As Long
For I = Columns(1).Rows.Count To 1 Step -1
If Selection(I).Row = 1 Then Exit Sub
If Selection(I) < Selection(I - 1) And Not IsEmpty _
(Selection(I - 1)) Then
With Selection(I)
.PageBreak = xlPageBreakManual
End With
End If
Next
End Sub

Assumes the names are in column A.

Select the column range then run the macro.


Gord Dibben MS Excel MVP


On Mon, 2 Nov 2009 07:02:02 -0800, randlesc
wrote:

Sorry, but I've been told by the administrator of the hospital that it must
be in Excel. I have tried to argue the advantages of it being in Access but
administration remains firm that it be an Excel report.

So, can anyone help?

BTW, I didn't mention but perhaps I didn't need to, the number of employees
changes weekly, both up and down.

"Geoff_L" wrote:

If you keep the information in Access you could create a report that was a
lot easier to format than in Excel. You can create all the subtotals etc
that you need and have full control over how they appear. You can also force
a new page for each group, if the whole group won't fit on the remainder of
the page. If you are looking for presentation and not just raw facts and
figures, Access is the way to go - unless you have a lot of statistical
calculations to do. Even then it would be very simple to reimport it into
Access once you have done the statistical acrobats in Excel.

"randlesc" wrote:

I have a big report at work due every Tuesday that requires me to take
between 4,000 and 5,000 rows of information from Access and export them to
Excel.

My problem is that since this is an HR report, it needs to be divided by
department of which there are about 170 them. I need a page break after each
one.

Also, I have formulas that calculate the percentage of employees in each
department who have completed certain training.

What is the best way to do this? The powers that be do not like the look of
the page if I use the subtotal feature.

Currently, after I export the report to Excel, I go through and manually add
page breaks after each department and at the same time add the formulas. It
takes about four hours to do this manually.

Help?


.


  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Automatic page breaks and formulas

In which columns and cells would you want the formulas?

I am not clear about H, I then J, K

Maybe you would want formulas inserted into a row below each grouping?

Instead of a pagebreak?


Gord

On Mon, 2 Nov 2009 11:31:02 -0800, randlesc
wrote:

Thanks. This will help a lot. I'm assuming Column A is represented the
numeral 1 in the third line?

The formulas are percentages placed adjacent to the data. For example,
Column C has the data, Column D is the percentage.

My example would be H, I then J, K, then L, M

The formula is the same in each (with the only difference being the columns
in the range).

=(COUNTIF(H2:H68, "Yes"))/(COUNT(C2:C68))

This is from the first group of my report. (For what its worth, I've
noticed when I copy and past the end of the range updates correctly each
time, but the beginning seldom does and is usually only 4 or 5 away from the
end. )

Again, many thanks for your help.

Charles

"Gord Dibben" wrote:

This macro will take care of the pagebreaks.

Not enough info to look after formulas but prolly can be done.

Sub InsertBreak_At_Change()
Dim I As Long
For I = Columns(1).Rows.Count To 1 Step -1
If Selection(I).Row = 1 Then Exit Sub
If Selection(I) < Selection(I - 1) And Not IsEmpty _
(Selection(I - 1)) Then
With Selection(I)
.PageBreak = xlPageBreakManual
End With
End If
Next
End Sub

Assumes the names are in column A.

Select the column range then run the macro.


Gord Dibben MS Excel MVP


On Mon, 2 Nov 2009 07:02:02 -0800, randlesc
wrote:

Sorry, but I've been told by the administrator of the hospital that it must
be in Excel. I have tried to argue the advantages of it being in Access but
administration remains firm that it be an Excel report.

So, can anyone help?

BTW, I didn't mention but perhaps I didn't need to, the number of employees
changes weekly, both up and down.

"Geoff_L" wrote:

If you keep the information in Access you could create a report that was a
lot easier to format than in Excel. You can create all the subtotals etc
that you need and have full control over how they appear. You can also force
a new page for each group, if the whole group won't fit on the remainder of
the page. If you are looking for presentation and not just raw facts and
figures, Access is the way to go - unless you have a lot of statistical
calculations to do. Even then it would be very simple to reimport it into
Access once you have done the statistical acrobats in Excel.

"randlesc" wrote:

I have a big report at work due every Tuesday that requires me to take
between 4,000 and 5,000 rows of information from Access and export them to
Excel.

My problem is that since this is an HR report, it needs to be divided by
department of which there are about 170 them. I need a page break after each
one.

Also, I have formulas that calculate the percentage of employees in each
department who have completed certain training.

What is the best way to do this? The powers that be do not like the look of
the page if I use the subtotal feature.

Currently, after I export the report to Excel, I go through and manually add
page breaks after each department and at the same time add the formulas. It
takes about four hours to do this manually.

Help?


.


  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default Automatic page breaks and formulas

Thanks once again.

H has the data, the formula goes into I
J has the data, the formula goes into K

There are easier ways to do this, I know but I have no choice. It must be
in the set up administration designed--don't get me started on how I feel
about this decision.

Thanks.

"Gord Dibben" wrote:

In which columns and cells would you want the formulas?

I am not clear about H, I then J, K

Maybe you would want formulas inserted into a row below each grouping?

Instead of a pagebreak?


Gord


  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Automatic page breaks and formulas

After posting my last message I started thinking that perhaps a Pivot Table
may be the way to go rather than macros.

If you wish to have a go at that, see Debra Dalgleish's site for mucho help.

http://www.contextures.on.ca/tiptech.html

Look under "P" for Pivot Tables.

I still can't quite reconcile your posted COUNTIF/COUNT formula with your
description.

Does column C remain a constant divisor for H, J and K?

Can you send me the workbook?

email to gorddibbATshawDOTca Change the obvious.


Gord

On Mon, 2 Nov 2009 15:24:01 -0800, randlesc
wrote:

Thanks once again.

H has the data, the formula goes into I
J has the data, the formula goes into K

There are easier ways to do this, I know but I have no choice. It must be
in the set up administration designed--don't get me started on how I feel
about this decision.

Thanks.

"Gord Dibben" wrote:

In which columns and cells would you want the formulas?

I am not clear about H, I then J, K

Maybe you would want formulas inserted into a row below each grouping?

Instead of a pagebreak?


Gord


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatic insertion of page breaks Winston Excel Discussion (Misc queries) 0 July 14th 08 09:16 PM
deleting automatic page breaks Bill Craig Excel Worksheet Functions 1 April 11th 08 06:41 PM
Automatic page breaks Bob Johnson Excel Discussion (Misc queries) 0 September 28th 06 05:38 PM
Automatic Page Breaks Cici Excel Worksheet Functions 1 June 23rd 06 09:59 PM
How do I remove automatic page breaks? Cici Excel Worksheet Functions 3 June 23rd 06 09:59 PM


All times are GMT +1. The time now is 04:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"