Exclude Subtotal Amounts from a sumif formula.

RixRox

New Member
Joined
Sep 19, 2017
Messages
13
I have negative and positive numbers (hours) that I want to sum from several categories on my spread sheet. Each category has a subtotal.

I want to sum both positive and negative hours in one column (start to finish) without including the subtotals. Any help would be much appreciated. Thank-you.

1
-1
2
-2
3
-3
4
-4
5
-5
10
10.00 subtotal =SUBTOTAL(9,A2:A12)
-15.00negative hours =SUMIF(A2:A13,"<0")
35.00positive hours =SUMIF(A2:A13,">0")

<tbody>
</tbody>
You can see that the subtotal is being added to the positive hours.

<colgroup><col></colgroup><tbody>
</tbody>
<strike></strike>

<colgroup><col><col></colgroup><tbody>
</tbody>
<strike></strike>


<colgroup><col><col></colgroup><tbody>
</tbody>
=SUMIF(A2:A13,"<0")negative hours
=SUMIF(A2:A13,">0")positive hours

<colgroup><col><col></colgroup><tbody>
</tbody>
 
Yep, I see it now ... I've been looking for the perfect formula for so long, I saw a mirage and I drank the sand.

I tried inserting the formula you suggested, where you suggested, to no avail. Perhaps I put it in the wrong cell; Also, I have many columns (with subtotals) to sum, not just the labor columns, so I have returned to my original formula(s).

Calculated from I:118 =SUMIF(I7:I63,">0")+SUMIF(I65:I73,">0")+SUMIF(I75:I83,">0")+SUMIF(I85:I88,">0")+SUMIF(I90:I103,">0")+SUMIF(I105:I114,">0") which calculates the correct number ever so manually...

Thanks for your patience.

Picture with reference:
36604574714_ccd2decffd_b.jpg

and,
37058287030_cba26e5a0a_b.jpg
 
Upvote 0

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Forum statistics

Threads
1,215,724
Messages
6,126,482
Members
449,316
Latest member
sravya

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