Pomoc LibreOffice 7.5
Zwraca ciąg wskazujący, gdzie liczba występuje w obliczonej serii zakresów.
Partition( Number, Start, End, Interval)
String
Number: Wymagany. Liczba określająca partycję.
Start: Wymagany. Liczba całkowita określająca dolną wartość zakresu liczb.
End: Required. An integer number defining the highest value of the range.
Interval: Required. An integer number that specifies the size of the partitions within the range of numbers (between Start and End).
Option VBASupport 1
Option Explicit
Sub Test_Partition
Dim retStr As String
retStr = Partition(20, 0, 98, 5)
print "20:24 liczba 20 występuje w zakresie: " & retStr
retStr = Partition(20, 0, 99, 1)
print " 20: 20 liczba 20 występuje w zakresie: " & retStr
retStr = Partition(120, 0, 99, 5)
print "100: liczba 120 występuje w zakresie: " & retStr
retStr = Partition(-5, 0, 99, 5)
print " : -1 liczba -5 występuje w zakresie: " & retStr
retStr = Partition(2, 0, 5, 2)
print " 2: 3 liczba 2 występuje w zakresie: " & retStr
End Sub