SUMIFS Units and skip such values

Salamullah

Board Regular
Joined
Mar 28, 2011
Messages
221
[TABLE="width: 500"]
<tbody>[TR]
[TD]Units
[/TD]
[TD]Amount
[/TD]
[TD]Month
[/TD]
[/TR]
[TR]
[TD]100
[/TD]
[TD]2300
[/TD]
[TD]Jan
[/TD]
[/TR]
[TR]
[TD]100
[/TD]
[TD]0.10
[/TD]
[TD]Jan
[/TD]
[/TR]
[TR]
[TD]200
[/TD]
[TD]1000
[/TD]
[TD]Feb
[/TD]
[/TR]
[TR]
[TD]-200
[/TD]
[TD]-1000
[/TD]
[TD]Feb
[/TD]
[/TR]
[TR]
[TD]300
[/TD]
[TD]2000
[/TD]
[TD]Jan
[/TD]
[/TR]
[TR]
[TD]300
[/TD]
[TD]-0.08
[/TD]
[TD]Jan
[/TD]
[/TR]
</tbody>[/TABLE]

I want to apply formula in the column A Units and wanted to skip units if Values in column B is between -0.5 to 0.5, please help based on the above example the answer of column A should be 400 in Cell E2 whereas D2 contained Jan. with SUMIFS formula
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
This is 400, but do you really mean SKIP within that range? If so, it wouldn't be 400 would it?

Code:
=SUMIFS(A2:A7,B2:B7,">="&-0.5,B2:B7,"<="&0.5)
 
Last edited:
Upvote 0
Maybe you mean this:

Code:
=SUMPRODUCT((A2:A7)*((B2:B7<=-0.5)+(B2:B7>=0.5)))

which is 400 which is the sum of all the values in the A column that are <=-0.5 OR >=0.5
 
Last edited:
Upvote 0
Or is this what you want


Book1
ABCD
1UnitsAmountMonth
21002300Jan400
31000.1Jan
42001000Feb
5-200-1000Feb
63002000Jan
7300-0.08Jan
Week 28
Cell Formulas
RangeFormula
D2=SUMPRODUCT((C2:C7=C2)*((B2:B7<=-0.5)+(B2:B7>=0.5))*(A2:A7))
 
Upvote 0
Glad we could help & thanks for the feedback.

For reference, which formula is correct?
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,219
Members
452,620
Latest member
dsubash

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