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

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
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,222,244
Messages
6,164,792
Members
451,917
Latest member
WEB78

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