# ListOK

Tags: Calc Education

last edited: 2023-01-24

Rating:

Several Calc functions for operations with Sets

## Description

The extension adds to the Add-in category of the Function Wizard:

**LST()**Converts a text string to a normalized Set notation**LSTARR()**Converts a text strings from cell range to a normalized Set**LSTAND()**A ∪ B (union) - the Set of all things that are members of either A or B**LSTDEL()**A\B (relative complement) - Set difference of A and B, Set of elements in A but not in B**LSTOR()**A ∩ B (intersection) - the Set of all things that are members of both A and B**LSTCNT()**|A| (cardinality) - the number of elements of the Set**LSTNOT()**A′ (complement) - are the elements not in A**LSTIN()**A ∈ B (subset) - the Set A is a subset of B (contained in B)**LSTHAL()**Values of Set - horizontal array of Set elements**LSTVAL()**Values of Set - vertical array of Set elements**LSTFMT()**Formatted string - pad each display value of the Set with leading zeros to the specified length

The scope of use of functions is very wide. For example, check if the current time is included in a predefined list of hours

**=IF(LSTIN(HOUR(NOW());"0-8, 13, 19-23");"Free time";"Working time")**

Or quickly form a long array of even numbers **{=LSTHAL("1-10")*2}**

Or collect the values listed in the column into single string **=LSTARR(C5:C18)** - similar to * =TEXTJOIN (", ";1;C5:C18)*, but it is also written shorter, and the result is usually a little more compact (for example, instead of

*"26, 19, 15, 14, 16, 2, 6, 12, 7, 17, 10, 28, 27, 11"*the string will be

*"2, 6, 7, 10-12, 14-17, 19, 26-28"*)

Or calculate something like * =SORT(UNIQUE(A5:A25))* (for natural numbers) with

**{=LSTVAL(LSTARR(A5:A25))}**

But the main purpose of these functions is to process lists of numbered objects. For example, the formation and verification of reports on the use of forms of insurance policies (to solve this problem, the first version of these algorithms was written)

Homepage: https://extensions.libreoffice.org/en/extensions/show/5118

## Post your review

You cannot post reviews until you have logged in. Login Here.

## Reviews

Roman Kuznetsov Apr 6, 2021, 3:06 PM (2 years ago)

Please change a language to English in (Sub)Title and in Release Notes description ;-)

A great extension

No one has commented on this page yet.

RSS feed for reviews on this page | RSS feed for all reviews