ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   calculating total in a range of numbers (https://www.excelbanter.com/excel-discussion-misc-queries/97103-calculating-total-range-numbers.html)

Joe K

calculating total in a range of numbers
 
I would like to calculate the sum of all values that are greater than 20 and
less 50 in the following data set. Can anyone give me the formula for this
computation.

5
5
19
20
22
25
45
51
60

This is what I am after but with a larger data set. 20+22+25+45 = 112

bpeltzer

calculating total in a range of numbers
 
If, for example, your data is in column A, then
=sumif(a:a,"=20",a:a)-sumif(a:a,"50",a:a) should get it. BTW, this formula
would INCLUDE the values 20 and 50 since your example included it in the sum.

"Joe K" wrote:

I would like to calculate the sum of all values that are greater than 20 and
less 50 in the following data set. Can anyone give me the formula for this
computation.

5
5
19
20
22
25
45
51
60

This is what I am after but with a larger data set. 20+22+25+45 = 112


Bearacade

calculating total in a range of numbers
 

Assuming this range is in A1:A9

=SUMIF(A1:A9,"20")-SUMIF(A1:A9,"50")


--
Bearacade


------------------------------------------------------------------------
Bearacade's Profile: http://www.excelforum.com/member.php...o&userid=35016
View this thread: http://www.excelforum.com/showthread...hreadid=557489



All times are GMT +1. The time now is 10:02 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com