Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel - Something Simple - How to Subtotal?

Status
Not open for further replies.

pjmdesigns

Technical User
Mar 7, 2003
39
GB
Hi

I have a table of data which is about 6,000 rows deep; by way of an example this might contain the following:

Employee Monthly Bonus otherdata1 otherdata2 etc
111 1,000
111 1,500
111 1,254
254 5,254
254 6,854
122 1,111
356 5,552
356 2,452

I need to subtotal the monthly bonus per employee (the employee is unique). The thing is I have little idea where to start with Macros, so I wondered if there was a solution using an Excel function. I have looked at SUBTOTAL but this doesn't seem to do what I want. I have managed to do this using a three stage formula, but surely there is an easy way?

Any help would be greatly appreciated!

Thanks in advance
PJ
 
In what way does SUBTOTAL not do what you want? I take it that you are referring to the menu command Data/Subtotals, and not just to the SUBTOTAL formula function.



Cheers, Glenn.

My grandfather was ill, and my grandmother smeared goose-grease on his back. He went downhill very quickly after that.
 
Hi,

I agree with Glenn -- use the Data/Subtotal feature.

The SUBTOTAL Function (which does more than SUM if you check help) will aggregate, ignoring other embedded SUBTOTAL formulas in a range.

Skip,

[glasses] [red]Be advised:[/red] When transmitting sheet music...
If it ain't baroque, don't fax it! [tongue]
 
Hi,
I think what you are looking for is a function called sumif. This will give you exactly what you are looking for.

Jamie

 
I must be honest I didn't even know DATA / SUBTOTAL existed, it is almost what I want but the format isn't too good. SUMIF sounds promising; I'll give it a try.

Thanks.
 
Data / Subtotal WILL give you exactly what you want provided you DATA SORT the Employee number (and associated data) first. It avoids the need for you to duplicate (or forget) an Employee number when you are using the SUMIF function.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top