Multi Formula With Exclusions For Jail Inmate Count
"Dave" wrote in message
...
Problem:
In Cells V9:V28, I have a time listed formatted as [hh]mm. The time in
these
cells represent the amount of time an inmate was held in custody.
In Cell G31, I have the total number of Male Adults in custody shown. In
Cell G32, I have the total number of Female Adults in custody shown. In
Cell
G36, I have the total number of Juvenile Males in custody shown and in
G37, I
have the total number of Juvenile Females in custody shown.
Cells F9:F28 is where the "J"'s are listed, when applicable, and Cells
G9:G28 just reflects either "M for Male or "F" for Female regardless in
adult
or juvenile. What I want to accomplish using the above, if possible, is
the
following:
First Formula:
In Cell L31, the amount of time spent in custody for Male Adults only. In
Cell L32, the amount of time spent in custody for Female Adults only. In
Cell
L34, the amount of time spent in custody for Male Juveniles only. In Cell
L35, the amount of time spent in custody for Female Juveniles only.
L31: =SUMPRODUCT(--($F$9:$F$28=""),--($G$9:$G$28="M"),$V$9:$V$28)
L32: =SUMPRODUCT(--($F$9:$F$28=""),--($G$9:$G$28="F"),$V$9:$V$28)
L33: =SUMPRODUCT(--($F$9:$F$28="J"),--($G$9:$G$28="M"),$V$9:$V$28)
L34: =SUMPRODUCT(--($F$9:$F$28="J"),--($G$9:$G$28="F"),$V$9:$V$28)
Second Formula:
In Cell L40, I want to show the average stay for all Juveniles (male &
female) and in Cell L42, I want to show the average stay for all Adults
(male
and female).
L40: =AVERAGE(IF($F$9:$F$28="J",$V$9:$V$28))
L42: =AVERAGE(IF($F$9:$F$28="",$V$9:$V$28))
Both of thes last two formulae are array formulae, and should be committed
with Ctrl-Shift-Enter, not just Enter.
..
|