# Sum Range

#### bayoung

##### Board Regular
I am trying to write a sumif based on a range. For example, I want to sum anything in column B, providing the data in column A is between 1 to 8. If the date is any other number, then ignore it.

Is this possible?

### 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).
=sum(sumif(a:a,{">=1",">8"},b:b)*{1,-1})

=SUMPRODUCT((A1:A100>=1)*(A1:A100<=8)*(B1:B100))

Not as elegant as Kris's,

=SUMIF(A1:A10,">=1",B1:B10)-SUMIF(A1:A10,">8",B1:B10)

Replies
2
Views
39
Replies
20
Views
295
Replies
6
Views
119
Replies
2
Views
680
Replies
14
Views
489

1,217,357
Messages
6,136,081
Members
449,990
Latest member
orthodmd

### 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.

### Which adblocker are you using?

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

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