View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default COUNTIF for date and amount

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)

--
Biff
Microsoft Excel MVP


"Outlook, eh?" wrote in message
...
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