Excel – Total Range of Values
Issue
I'm trying to get a range of values totalled.
I have one set of columns, let’s say column A1 to A200, ranging from -30 up to 1000 and another column adjacent (let’s say B1 to B200) with figures I need totalling
I want a formula to look at the first column A between the values-30 (MINUS 30) and 0 (ZERO) return the adjacent column B with a sum of what it found
Then following this in the next cell down I want it to look at the same criteria and show values between 1 and 30 and so on for selected ranges in column A.
Solution
Just use below formula ... for 0 to -100 which will add column B ......
=SUMPRODUCT((A1:A200<=0)*(A1:A200>=-100)*(B1:B200))
91 to 120
=SUMPRODUCT(($A$1:$A$200<=120)*($A$1:$A$200>=91)*($B$1:$B$200))
Over 120 ....
=SUMPRODUCT(($A$1:$A$200>120)*($B$1:$B$200))
And so on ........
Note
Thanks to
mubashir azizfor this tip on the forum.