Looking for ideas on best practices to run a "report" on data values. Specifically, I just want to take an array and produce a report that counts all of the occurrences of a string value. For example, if the array were something like this:
U5L4
U5L4
U5L4
U6L5
U4L12
The reports would produce something like this:
U5L4 3
U6L5 1
U4L12 1
Any help is appreciated. Thanks!
litlmike,
I would do it like this:
#include <Array.au3>
Global $aList[] = ["U5L4", "U5L4", "U5L4", "U6L5", "U4L12"]
; Convert list to string - use double delimiters to prevent partial matches
$sList = "||" & _ArrayToString($aList, "||") & "||"
; Get unique elements of array
$aUnique = _ArrayUnique($aList)
; And add a column
_ArrayColInsert($aUnique, 1)
; loop through the unique elements
For $i = 1 to