# CountPassFail

Counts and returns passes, failures and total events for a given referenced value.

## CountPassFail Inputs

Parameter | Description
--- | ---
Event | Specifies the event on which to increment the counter. This parameter needs to be a reference to any event with a timestamp, for example, one of the following: A cell containing an Event function. A cell containing a Button function.
Value | Specifies a required reference to the cell containing the source of the data stream to be counted. Must reference a numeric or Status cell. If no cell is referenced, the function returns a #ERR for all results. The counter that is incremented (Pass, Fail or #ERR) is based on the returned Value, as follows:
Pass | Value > 0
Fail | Value = 0
#ERR | Value < 0
Reset | Forces the counters to reset at the next event. Specifies whether the counters will be reset to zero when the specified Event occurs. This parameter automatically references the Reset button, which is inserted into the spreadsheet when the function is initially created. Note: If this checkbox is manually toggled in the Property Sheet, the reference to the Reset button will be removed. To use the Reset button, this parameter must reference the cell containing the Reset button.
0 = OFF (default) | Do not reset counters.
1 = ON | Reset counters when the specified Event occurs.

## CountPassFail Outputs

Returns | A Count data structure containing the incremented counters or #ERR if any of the input parameters are invalid.
Results | When CountPassFail is initially inserted into a cell, a result table and a Resetbutton are created in the spreadsheet. When the Reset button is pressed, all counters will be reset to zero. The following Clocked Data Storage Vision Data Access functions are automatically inserted into the spreadsheet to create the result table:
Label | Function | Description
Passes | GetPassCount(Count) | The incremental count of passes. The counter is incremented when the returned is greater than zero.
Failures | GetFailCount(Count) | The incremental count of failures. The counter is incremented when the returned Value is equal to zero.
Errors | GetErrorCount(Count) | The incremental count of errors. The counter is incremented when the returned Value is less than zero.
Total | GetTotalCount(Count) | The total number of passes, failures and errors.