Visual Basic for Applications/Discrete Data Bin Stats

Summary
This code module is intended for MS Excel, since it writes a set of statistics to the worksheet. It assumes that there is discrete data in a 1D array, either string or numeric. A set of statistics is printed, not for the raw data on the array, but for the bin-count of discrete values found on it. It includes a listing of the bin counts and other statistics. For example, if the array contained only elements with a one or a zero value, the results would list the overall counts of each, and produce other statistics.

Notes on the code

 * Copy the entire code listing into an Excel Standard module, save it, then run the top procedure.