#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 19
Default How to get totals

Hello all. I have a list I am working with in excel 2003. The columns I am
interested in are Employee, Overtime Code, Pay and Comp. There are
approximately 50
overtime codes. I need to total the pay and comp columns for each employee.
My problem is that if the OT codes are certain numbers, they will not be used
in the calcualtions. Like so:
EMPLOYEE OT CODE PAY COMP
Jones 1 4 0
Jones 6 4 0
Jones 5.02 0 4
Jones 18 2 0
Jones 9 0 4

Smith 5.02 0 4
Smith 7 1 0
Smith 9 2 0
Smith 17.4 0 1
Smith 1 0 4

The overtime codes of 1 and 9 are not to be used in the caluclations, so my
totals will be
Jones 6 4
Smith 1 5

Any help on how to do this? I can do it in either a list or a regular range
of cells. I thought I macro might help, but I'm having trouble figuring out
how to do it.

Thanks for any help.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default How to get totals

I'd add a new column or two.

Give them the headers of "Adjusted Pay" and "Adjusted Comp"

Then fill them with formulas like:
=if(or(b2={1,6}),0,c2)
or to hide the 0's
=if(or(b2={1,6}),"",c2)

And the same for the Adjusted Comp field.

Then use data|subtotals and use these adjusted fields for your subtotals.

ps. I'd remove all the empty rows in my data, too. It just screws up the
control breaks when you use data|subtotal.


RM270 wrote:

Hello all. I have a list I am working with in excel 2003. The columns I am
interested in are Employee, Overtime Code, Pay and Comp. There are
approximately 50
overtime codes. I need to total the pay and comp columns for each employee.
My problem is that if the OT codes are certain numbers, they will not be used
in the calcualtions. Like so:
EMPLOYEE OT CODE PAY COMP
Jones 1 4 0
Jones 6 4 0
Jones 5.02 0 4
Jones 18 2 0
Jones 9 0 4

Smith 5.02 0 4
Smith 7 1 0
Smith 9 2 0
Smith 17.4 0 1
Smith 1 0 4

The overtime codes of 1 and 9 are not to be used in the caluclations, so my
totals will be
Jones 6 4
Smith 1 5

Any help on how to do this? I can do it in either a list or a regular range
of cells. I thought I macro might help, but I'm having trouble figuring out
how to do it.

Thanks for any help.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 19
Default How to get totals

Thank you Dave. That will work. I hoped it would be something easy, and this
is. I don't suppose you know if I can print just the subtotals from a sort,
do you?

Thanks
PS my real data does not have blank rows. I just put it in my example to
emphasize
the name change.

"Dave Peterson" wrote:

I'd add a new column or two.

Give them the headers of "Adjusted Pay" and "Adjusted Comp"

Then fill them with formulas like:
=if(or(b2={1,6}),0,c2)
or to hide the 0's
=if(or(b2={1,6}),"",c2)

And the same for the Adjusted Comp field.

Then use data|subtotals and use these adjusted fields for your subtotals.

ps. I'd remove all the empty rows in my data, too. It just screws up the
control breaks when you use data|subtotal.


RM270 wrote:

Hello all. I have a list I am working with in excel 2003. The columns I am
interested in are Employee, Overtime Code, Pay and Comp. There are
approximately 50
overtime codes. I need to total the pay and comp columns for each employee.
My problem is that if the OT codes are certain numbers, they will not be used
in the calcualtions. Like so:
EMPLOYEE OT CODE PAY COMP
Jones 1 4 0
Jones 6 4 0
Jones 5.02 0 4
Jones 18 2 0
Jones 9 0 4

Smith 5.02 0 4
Smith 7 1 0
Smith 9 2 0
Smith 17.4 0 1
Smith 1 0 4

The overtime codes of 1 and 9 are not to be used in the caluclations, so my
totals will be
Jones 6 4
Smith 1 5

Any help on how to do this? I can do it in either a list or a regular range
of cells. I thought I macro might help, but I'm having trouble figuring out
how to do it.

Thanks for any help.


--

Dave Peterson
.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default How to get totals

If you apply data|subtotals, you can use the outlining symbols at the left to
show or hide as many details as you want.

When you're happy, you can print what you see.



RM270 wrote:

Thank you Dave. That will work. I hoped it would be something easy, and this
is. I don't suppose you know if I can print just the subtotals from a sort,
do you?

Thanks
PS my real data does not have blank rows. I just put it in my example to
emphasize
the name change.

"Dave Peterson" wrote:

I'd add a new column or two.

Give them the headers of "Adjusted Pay" and "Adjusted Comp"

Then fill them with formulas like:
=if(or(b2={1,6}),0,c2)
or to hide the 0's
=if(or(b2={1,6}),"",c2)

And the same for the Adjusted Comp field.

Then use data|subtotals and use these adjusted fields for your subtotals.

ps. I'd remove all the empty rows in my data, too. It just screws up the
control breaks when you use data|subtotal.


RM270 wrote:

Hello all. I have a list I am working with in excel 2003. The columns I am
interested in are Employee, Overtime Code, Pay and Comp. There are
approximately 50
overtime codes. I need to total the pay and comp columns for each employee.
My problem is that if the OT codes are certain numbers, they will not be used
in the calcualtions. Like so:
EMPLOYEE OT CODE PAY COMP
Jones 1 4 0
Jones 6 4 0
Jones 5.02 0 4
Jones 18 2 0
Jones 9 0 4

Smith 5.02 0 4
Smith 7 1 0
Smith 9 2 0
Smith 17.4 0 1
Smith 1 0 4

The overtime codes of 1 and 9 are not to be used in the caluclations, so my
totals will be
Jones 6 4
Smith 1 5

Any help on how to do this? I can do it in either a list or a regular range
of cells. I thought I macro might help, but I'm having trouble figuring out
how to do it.

Thanks for any help.


--

Dave Peterson
.


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 19
Default How to get totals

Thank you Dave. You have been so helpful. It does just what I want it to do
now!

"Dave Peterson" wrote:

If you apply data|subtotals, you can use the outlining symbols at the left to
show or hide as many details as you want.

When you're happy, you can print what you see.



RM270 wrote:

Thank you Dave. That will work. I hoped it would be something easy, and this
is. I don't suppose you know if I can print just the subtotals from a sort,
do you?

Thanks
PS my real data does not have blank rows. I just put it in my example to
emphasize
the name change.

"Dave Peterson" wrote:

I'd add a new column or two.

Give them the headers of "Adjusted Pay" and "Adjusted Comp"

Then fill them with formulas like:
=if(or(b2={1,6}),0,c2)
or to hide the 0's
=if(or(b2={1,6}),"",c2)

And the same for the Adjusted Comp field.

Then use data|subtotals and use these adjusted fields for your subtotals.

ps. I'd remove all the empty rows in my data, too. It just screws up the
control breaks when you use data|subtotal.


RM270 wrote:

Hello all. I have a list I am working with in excel 2003. The columns I am
interested in are Employee, Overtime Code, Pay and Comp. There are
approximately 50
overtime codes. I need to total the pay and comp columns for each employee.
My problem is that if the OT codes are certain numbers, they will not be used
in the calcualtions. Like so:
EMPLOYEE OT CODE PAY COMP
Jones 1 4 0
Jones 6 4 0
Jones 5.02 0 4
Jones 18 2 0
Jones 9 0 4

Smith 5.02 0 4
Smith 7 1 0
Smith 9 2 0
Smith 17.4 0 1
Smith 1 0 4

The overtime codes of 1 and 9 are not to be used in the caluclations, so my
totals will be
Jones 6 4
Smith 1 5

Any help on how to do this? I can do it in either a list or a regular range
of cells. I thought I macro might help, but I'm having trouble figuring out
how to do it.

Thanks for any help.

--

Dave Peterson
.


--

Dave Peterson
.

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
Pivot Totals: Group totals different from Grand totals PsyberFox Excel Discussion (Misc queries) 1 February 13th 08 06:16 PM
Grand Totals with Nested Sub Totals Brenda from Michigan Excel Discussion (Misc queries) 7 January 18th 08 01:26 PM
how to enter totals and sub totals from receipts into excel. mjd23 New Users to Excel 2 January 11th 08 01:54 AM
Summing Weekly Totals into Monthly Totals steph44haf Excel Worksheet Functions 3 July 5th 06 04:51 PM
Comparing/matching totals in a column to totals in a row Nicole L. Excel Worksheet Functions 3 January 27th 05 10:42 PM


All times are GMT +1. The time now is 09:02 AM.

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

About Us

"It's about Microsoft Excel"