sumif?

  • Thread starter Thread starter Jim
  • Start date Start date
J

Jim

Hi...

I have a pretty simple spreadsheet with a record of ticket sales for an
event. One column has the date the ticket(s) were sold, and I would like to
have another column that will sum the totals sold for each month. Is there a
way to use sumif to accomplish this, or is there a better way?

Thanks in advance...

Jim
 
One way, assume A2:A50 are the dates and the tickets sold are in B2:B50


=SUMPRODUCT(--(A2:A50<>""),--(MONTH(A2:A50)=2),B2:B50)

will sum B2:B50 for February

If you only have one range and want to count the dates in February

=SUMPRODUCT(--(A2:A50<>""),--(MONTH(A2:A50)=2))

the <>"" just guards against blank cells which otherwise will be counted as
January


--


Regards,

Peo Sjoblom

Excel 95 - Excel 2007
Northwest Excel Solutions
www.nwexcelsolutions.com
(Remove ^^ from email)
 
Hi!
another column that will sum the totals sold for each month.

That sounds like you want the COUNT of dates for each month?

Are the dates all within the same year?

If so, here's one way:

Assume dates are in the range A1:A20.

Enter this formula in say, D1:

=TEXT(DATE(2006,ROWS($1:1),1),"Mmm")

Enter this formula in E1:

=SUMPRODUCT(--(ISNUMBER(A$1:A$20)),--(MONTH(A$1:A$20)=ROWS($1:1)))

Select both D1 and E1 then copy down to row 12.

Biff
 
Back
Top