sumif?

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
 
P

Peo Sjoblom

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)
 
B

Biff

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top