View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gina[_2_] Gina[_2_] is offline
external usenet poster
 
Posts: 49
Default Need to Count the number of times a value occurs within a dt r

Max, this is exactly what I needed. I really appreciate your help, and have
located a tutorial on sumproduct, and plan to study this for the rest of the
day.

Thank you so much,

Gina

"Max" wrote:

.. a function in Cell D1 of the "Summary" tab that
looks at A1:A2000 and D1:D2000 in the "Data" tab, and will
let me know how many occurences of "Recordable" (in D1:D2000)
happened within the date range of 1/1/2007 and 2/1/2007,
found in (A1:A2000) of the Data tab.


2 ways

In Summary,
In D1:
=SUMPRODUCT((TEXT(Data!A1:A2000,"mmmyy")="Jan07")* (Data!D1:D2000="Recordable"))
which returns it for the month/yr indicated

Or, if you have various startdates/"end"dates listed in A1:B1
(eg in A1: 1 Jan 07, in B1: 1 Feb 07)
then in D1 copied down:
=SUMPRODUCT((Data!A$1:A$2000=A1)*(Data!A$1:A$2000 <B1)*(Data!D$1:D$2000="Recordable"))
which also returns the same results for Jan07

Adapt the "=" & "<" signs to suit the start/enddates that you listed
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---