Usage of sumif

G

Guest

Lets assume I have a spreadshee. Cells A1-A365 has dates from January 1st
2004 to December 31st 2004. Cells b1-b365 has values. And cells C1-C12 I have
the months as follows Jan04, Feb04, Mar04, Apr04 etc. I want to compute all
the values for January 04 and put the result in cell d1 (for Jan), D2 for
Feb, D3 for Mar etc.
how can I do this using sumif? My problem really is how can I compare the
months so Jan04 compares to 01Jan04, 02Jan04, o3jan04 etc?
 
B

Biff

Hi!

Are your values in C1:C12 TEXT or formatted dates? They
look like TEXT to me.

Biff
 
M

Myrna Larson

One way: in C1 and copy down:

=SUMPRODUCT(--(MONTH($A$1:$A$365)=ROW()),$B$1:$B$365)

Another way, assuming you have true dates (not text) in column A, is to put
headers in row 1, then use a pivot table. Use the Dates as a row field and the
values in column B as the data field. Group the dates by month and year.
 

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