Spreadsheet: 221115d1363370902-my-current-function-needs-to-not-calculate-in-those-that-are-no-longer-on-my-program-help-stats-help-new
Sheet: Sheet2

 |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Date Referred | Install Date | Removal Date | Total # of Days Sentenced | Offender | Agency | Total # of Days Served at time of report | Offence that put Offender on Program | Violations Yes/No | Violated from Program Yes/No | Was it a Misd. or Felony | What is Violation | Date of Report
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 2012-12-07 00:00:00 | 2013-01-27 00:00:00 | 2013-05-12 00:00:00 | 105 | Doe, [NAME] | [NAME] | 63 | DUI |  | yes | felony | DUI Alcohol | 2013-03-31 00:00:00
 |  |  | REPORT PREPARED FOR: |  |  | [NAME] |  |  |  |  |  |  | . |  | 2013-01-15 00:00:00 | 2013-02-15 00:00:00 | 2013-03-11 00:00:00 | 24 | Doe, [NAME] | [NAME] | 24 | DUI |  | no |  | DV | 2013-03-31 00:00:00
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 2013-03-01 00:00:00 | 2013-03-16 00:00:00 | Pre-Trial | PT | Doe, [NAME] | [NAME] | 15 | Traffic | YES | yes |  | DV | 2013-03-31 00:00:00
 |  |  | DATE OF REPORT: |  | 2013-03-31 00:00:00 |  |  |  |  |  |  |  |  |  | 2013-02-21 00:00:00 | 2013-03-17 00:00:00 | 2013-04-01 00:00:00 | 15 | Doe, [NAME] | [NAME] | 14 | DUI |  | yes |  | DV | 2013-03-31 00:00:00
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 2013-02-21 00:00:00 | 2013-03-28 00:00:00 | 2013-04-13 00:00:00 | 16 | Doe, [NAME] | [NAME] | 3 | DUI |  |  |  | UI Alcohol | 2013-03-31 00:00:00
 | Reporting Period |  |  |  |  |  |  |  |  |  |  |  |  |  | 2013-02-06 00:00:00 | 2013-04-10 00:00:00 | 2013-04-17 00:00:00 | 7 | Doe, [NAME] | [NAME] | 0 | DUI |  | yes | felony | DUI Drugs | 2013-03-31 00:00:00
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 2013-02-12 00:00:00 | 2013-02-13 00:00:00 | 2013-02-28 00:00:00 | 15 | Doe, [NAME] | [NAME] | 15 | DUI |  | yes | felony | DUI Drugs | 2013-03-31 00:00:00
 | From | To |  |  |  |  |  |  |  |  |  |  |  |  | 2013-02-13 00:00:00 | 2013-02-14 00:00:00 | 2013-03-14 00:00:00 | 28 | Doe, [NAME] | [NAME] | 28 |  |  |  |  |  | 2013-03-31 00:00:00
 | 2013-03-01 00:00:00 | 2013-03-31 00:00:00 |  |  |  |  |  |  |  |  |  |  |  |  |  | 2013-02-16 00:00:00 | 2013-03-15 00:00:00 | 27 | Doe, [NAME] 10 | [NAME] | 27 |  |  |  |  |  | 2013-03-31 00:00:00
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 2013-01-26 00:00:00 | 2013-02-15 00:00:00 | 20 | Doe, [NAME] | [NAME] | 20 |  |  |  |  |  | 2013-03-31 00:00:00
Done | 1 | Total # of Participants Refered during reporting period
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Q | R |  |  |  | V |  |  |  |  |  | AB
Done | 7 | Total # of Participants in Program during reporting period |  |  |  |  |  |  |  |  |  |  |  |  | What I am looking to accomplish is "The total number of days served at the time of my report.
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  | If someone was removed from the program prior to the first day of my current reporting month they should
Done | 3 | Total # of Participants Completing Program during reporting period |  |  |  |  |  |  |  |  |  |  |  |  | not be counted, and it should come back with a zero. The function I have is counting entries that
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  | were removed from the program prior to my reporting month, which in this case is 03/01/13 to 03/31/13.
Done | 3 | Total # of Participants that were violated from Program during reporting period |  |  |  |  |  |  |  |  |  |  |  |  | So any one completing the program in February or sooner, this should not be adding up their days
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  | served, it should return a zero, because they were never on the program during my current reporting month.
Done | 2 | Total # of Participants that have used alcohol and/or drugs while on program |  |  |  |  |  |  |  |  |  |  |  |  | The Q is the installation date, R is my removal date, V is the column I would like my answer in, AB is my
 |  | and/or refused an alcohol or drug test during the reporting period |  |  |  |  |  |  |  |  |  |  |  |  | date of report, and my reporting period is B10 From and [NAME] To.
Done | 2 | Number of DUI offenders that have used alcohol and/or drugs while on the
 |  | program and/or refused an alcohol or drug test during the reporting period
Done | 1 | Number of program participants that committed a new misd. [NAME] while
 |  | on program during the reporting period (See Offender info for individual accounts)