Conditional SUM help

  • Thread starter Thread starter Jay
  • Start date Start date
J

Jay

I have a 2 column, 52 row range A1:B52. The first column contains the
numbers 1 to 52 (weeks of the year), with the second containing various
numbers (sales).

If I want to sum the sales for weeks 12 to 17, how do I do it, using a
conditional sum (Sum column B where column A >=12 and <=17.)

Any help greatly appreciated,.....thanks,

Jay
 
Try this

=SUMPRODUCT(--(A1:A52>=12),--(A1:A52<=17),(B1:B52))

The -- will count the number of entries that meet the condition.

HTH,
Barb Reinhardt
 
=SUMIF(A1:A52,">=12",B1:B52)-SUMIF(A1:A52,">17",B1:B52)

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Hi Jay,

There should be no need to use column A to do that.
Try this,

C1: 12
C2: 17
C3: =SUM(INDIRECT("B"&C1&":B"&C2))

Change the C1 and C2 values to whatever weeks you wish.
Column A just becomes a visual reference.

HTH
Martin
 
Back
Top