Find the Least Occurring Values

Problem description

The following Excel file has a column of month values. A month appears in an indefinite number of times, as shown below:

undefined

We are counting the frequencies of each month’s appearances, and trying to find the month/months with the smallest count value. List the month or months in column C, as shown below:

undefined

 

Directions

1.   Open esProc and create a new file.

2.    Writhe the following code:

A

B

1

=clipboard().split("\n")

2

=A1.group(trim(~))

3

=A2.minp@a(~.count())

4

=A3.(~(1))

A1   Copy data area A2:A20 in Excel, paste it onto the clipboard, and split the values into a sequence.

A2   Rearrange the data by removing extra white spaces from certain data, and then divide values into groups.

A3   Count the occurrences of each month and get all months having the smallest count.

A4   Get value of the first item from each group.

 

3.   After the program is executed, copy A4’s content and paste it into cell C2 in Excel.

 

Q & A Collection

https://stackoverflow.com/questions/63726348/how-to-return-least-occuring-values-from-an-array-in-excel