COUNTIF for date and amount

O

Outlook, eh?

I am looking for a function to find money values within certain ranges and
within certain date ranges:

Here is what the data I will get will look like

A B
$15 1/12/10
$20 7/5/07


I understand how to count gifts by the dollar amount range using countif,
but I don't know how to create or add the date range.

Thanks a lot for your help,
-B
 
T

T. Valko

Try this...

Use cells to hold the criteria.

Amount boundaries:

D1 = lower boundary = 10
E1 = upper boundary = 50

Date boundaries:

D2 = lower boundary = 1/1/2010
E2 = upper boundary = 1/15/2010

Then:

=SUMPRODUCT(--(A1:A10>=D1),--(A1:A10<=E1),--(B1:B10>=D2),--(B1:B10<=E2))

If you're using Excel 2007 you can use this:

=COUNTIFS(A1:A10,">="&D1,A1:A10,"<="&E1,B1:B10,">="&D2,B1:B10,"<="&E2)
 

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