SUMIF

G

Guest

I'm trying to add up values in one row if the values in two other rows (in the same column) fall in the right values.

In Sheet 1 I have a list of dates, Y or N, and a dollar value. I want to get the results on Sheet 2 to tell me the sum of all the dollar values if the Y/N row is Y and if the date fall in a certain range (say 10/10/04 to 10/20/04). I thought the SUMIF function would work for me but I can't seem to get it to work. If I can get this to work using the SUMIF function that is great or if there is another way I would like to know as well.

Thanks
 
P

Peo Sjoblom

One way

=SUMPRODUCT(--(Sheet2!A1:A300>=--"10/10/04"),--(Sheet2!A1:A300<=--"10/20/04"
),--(Sheet2!B1:B300="Y"),Sheet2!C1:C300)

--
Regards,

Peo Sjoblom

(No private emails please, for everyone's
benefit keep the discussion in the newsgroup/forum)



eliwaite said:
I'm trying to add up values in one row if the values in two other rows (in
the same column) fall in the right values.
In Sheet 1 I have a list of dates, Y or N, and a dollar value. I want to
get the results on Sheet 2 to tell me the sum of all the dollar values if
the Y/N row is Y and if the date fall in a certain range (say 10/10/04 to
10/20/04). I thought the SUMIF function would work for me but I can't seem
to get it to work. If I can get this to work using the SUMIF function that
is great or if there is another way I would like to know as well.
 
S

Soo Cheon Jheong

Hi,

Try the following formula:

=SUMPRODUCT((A1:A300>=DATE(2004,10,4))
*(A1:A300<=DATE(2004,10,20))*(B1:B300="Y"),C1:C300)

--
Regards,
Soo Cheon Jheong
_ _
^¢¯^
--
 

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