dates that contain dates and times).
In addition, we also want to create the table of results seen in E7:F9.
For convenience,datais thenamed rangeB5:B16.
TheINT functionsimply removes the decimal portion of the date, leaving the serial number intact.
Next, theUNIQUE functionis used to remove duplicate dates.
Instead, the dates exist in anarrayreturned by the INT function.COUNTIF requires a rangefor therangeargument.
First, we use INT to strip times from dates and assign the result tod.
The result from SCAN is an array with 3 counts:
This array is returned to HSTACK asarray2.
HSTACK joinsarray1andarray2together horizontally, and returns the 2-column array as a final result.
Note that negative numbers becomemore negative.
For example, while INT(10.8) returns 10, INT(-10.8) returns -11.
Numbers include negative numbers, percentages, dates, times, fractions, and formulas that return numbers.
SCAN can be used to generate running totals, running counts, and other calculations…