Nothing Better Than Excel
New Member
Goal: sort an array (in an array-formula) within the formula either with standard functions or via a UDF.
Current Challenge: take a very large column of repeating values and identifying the five most-frequently occurring values (there will be many repeating values with the same frequency).
Approach: What I have currently tried is to come up with a unique list of values and then count the number of times they appear in the list. Now I have an array of entries with nn@item format. All I have to do here is sort the list and then toss content to the right of the fifth char(10).
{=StringConcat(CHAR(10),COUNTIF(DataQuality!AS2:AS200,"="&ArrayUnique(DataQuality!AS2:AS200&""))&"@"&ArrayUnique(DataQuality!AS2:AS200&""))}
STRINGCONCAT is a UDF that takes an array and creates a single text string with each array entry separated by the first parameter - in this case the new line, or char(10), character. I use this to put the values of an array into a single cell.
DataQuality!AS2:AS200 is a sample of my data for testing. Actual volume of data is about 35,000 entries with about 50 unique values.
ARRAYUNIQUE is a UDF that returns single values from an array with repetitive entries.
Thanks for all the brain power from those who will help me out here.
L
PS. is the array in an ARRAY FORMULA the same as the ARRAY in VBA?
Current Challenge: take a very large column of repeating values and identifying the five most-frequently occurring values (there will be many repeating values with the same frequency).
Approach: What I have currently tried is to come up with a unique list of values and then count the number of times they appear in the list. Now I have an array of entries with nn@item format. All I have to do here is sort the list and then toss content to the right of the fifth char(10).
{=StringConcat(CHAR(10),COUNTIF(DataQuality!AS2:AS200,"="&ArrayUnique(DataQuality!AS2:AS200&""))&"@"&ArrayUnique(DataQuality!AS2:AS200&""))}
STRINGCONCAT is a UDF that takes an array and creates a single text string with each array entry separated by the first parameter - in this case the new line, or char(10), character. I use this to put the values of an array into a single cell.
DataQuality!AS2:AS200 is a sample of my data for testing. Actual volume of data is about 35,000 entries with about 50 unique values.
ARRAYUNIQUE is a UDF that returns single values from an array with repetitive entries.
Thanks for all the brain power from those who will help me out here.
L
PS. is the array in an ARRAY FORMULA the same as the ARRAY in VBA?