You need the SUMIFS function which allows you to specify more than one condition.
For example: SUMIFS(B2:B10,B2:B10,">=24",B2:B10,"<=32")
or SUMIFS(B2:B10,B2:B10,">24",B2:B10,"<32").
This sums the cells B2 to B10 if the values lie between 24 and 32 (inclusive) or 24 and 32 (exclusive). You can add other arguments if you're summing values in a different column. Use Excel Help to use other forms of SUMIFS and experiment so that you get the correct format. SUMIF allows you to sum values in a different column to the one you're applying a condition. SUMIFS allows you to do this, too: SUMIFS(A2:A10,B2:B10,">=24",B2:B10,"<=32"). The sums are done for cells A2 to A10 using the criteria in B2 to B10 (values between 24 and 32).
Hope this helps.