Try this:On 2002-03-28 14:23, lars wrote:

How do I get a sumif formula or something like it to work for the following scenario

Here is my data in column a and b

1 100

2 50

3 70

4 79

5 85

6 60

7 78

8 90

9 100

I want to add anything greater then 3 and less than 8 by looking at column "a" then adding the numbers in column "B"....the result would be 302 (79+85+60+78)

Help?

=SUMPRODUCT((A1:A9>3)*(B1:B9))-SUMPRODUCT((A1:A9>=8)*(B1:B9))

This sums all the numbers in column B that are greater than 3, then subtracts the sum of all numbers greater than or equal to 8, giving you 4-7.

[ This Message was edited by: Russell Hauf on 2002-03-28 14:27 ]

## Like this thread? Share it with others