Help with SUMIF

D

Dafella

All,

I don't know where I'm going wrong -

I have a document with weekly hours like this

Group****wk1****wk2****wk3****wk4****wk5
AL********2******3******4******9******1
SP********3******5******7******2******3
TR********9******2******5******2******2

On another sheet I want to summerize
AL*****If group = AL wk1+wk2+wk3+wk4+wk5
SP*****If group = SP wk1+wk2+wk3+wk4+wk5
TR*****If group = TR wk1+wk2+wk3+wk4+wk5

I'm trying to get totals at the monthly level rather than weekly

I tried creating a range containing the weeks for each month
but when I create my sumif formula I'm getting totals from 1 column.

=sumif(group, "="&A1, Apr)
Returns 2
2 is the total for wk1
the total should be Apr = 19

Any ideas what I'm doing wrong?

Thanks in advance
Steve
 
H

Harlan Grove

Dafella said:
I have a document with weekly hours like this

Group****wk1****wk2****wk3****wk4****wk5
AL********2******3******4******9******1
SP********3******5******7******2******3
TR********9******2******5******2******2

On another sheet I want to summerize
AL*****If group = AL wk1+wk2+wk3+wk4+wk5
SP*****If group = SP wk1+wk2+wk3+wk4+wk5
TR*****If group = TR wk1+wk2+wk3+wk4+wk5

I'm trying to get totals at the monthly level rather than weekly

I tried creating a range containing the weeks for each month
but when I create my sumif formula I'm getting totals from 1 column.

=sumif(group, "="&A1, Apr)
Returns 2
2 is the total for wk1
the total should be Apr = 19
....

If the entire table in the first worksheet spanned columns A through F, with
group in column A and weeks of Apr in columns B through F, then you could
use the formula

=SUMPRODUCT((group=A1)*Apr)

The thing about SUMIF with three arguments is that if the first and third
arguments are sized or shaped differently, the size and shape of the third
is coerced into the size and shape of the first. Since your group range
spans only one column, only the first column of your range Apr is summed.
The SUMPRODUCT formula above avoids this, though it'll return errors if
group and Apr have different numbers of rows (and columns if group has more
than one column).
 

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

Similar Threads


Top