subtraction in subtotals?

bfeist

New Member
Joined
Mar 12, 2009
Messages
2
How do I use the subtotals function to subtract a group of numbers with the same name in excel 2003? for a simple example:

dog 10
dog 7
cat 4
cow 24
horse 2
horse 4

i want it to say dog total 3, cat total 4, cow total 24, horse total -2, ect.. right below each change in name just like subtotals does.
if subtotals is not possible, what function can i use that will subtract the numbers if the name is the same and if the name is not the same then just print the number in the cell? when there are 2 names though i want it to skip that first cell and print the subtraction total in only the 2nd row. another simple example:

dog 10
dog 7 3
cat 4 4
cow 24 24
horse 2
horse 4 -2
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Is there always 2 of each and are they always together, like the example
 
Upvote 0
How do I use the subtotals function to subtract a group of numbers with the same name in excel 2003? for a simple example:

dog 10
dog 7
cat 4
cow 24
horse 2
horse 4

i want it to say dog total 3, cat total 4, cow total 24, horse total -2, ect.. right below each change in name just like subtotals does.
if subtotals is not possible, what function can i use that will subtract the numbers if the name is the same and if the name is not the same then just print the number in the cell? when there are 2 names though i want it to skip that first cell and print the subtraction total in only the 2nd row. another simple example:

dog 10
dog 7 3
cat 4 4
cow 24 24
horse 2
horse 4 -2
Welcome to the MrExcel board!

For the second choice, try this formula (copied down).

Excel Workbook
ABC
1TypeNumber
2dog10 
3dog73
4cat44
5cow2424
6horse2
7horse4-2
8
Subtract
 
Upvote 0
Thank you sooo much!! I have over 50,000 cells so this saves me time and my sanity :) You guys are great!!
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,748
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top