Ayuda de LibreOffice 24.8
Returns a string indicating where a number occurs within a calculated series of ranges.
Partition( Number, Start, Stop, Interval)
String
Number: Required. The number to determine the partition.
Start: Required. An integer number defining the lower value of the range of numbers.
Stop: 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 Stop).
Option VBASupport 1
Option Explicit
Sub Test_Partition
Dim retStr As String
retStr = Partition(20, 0, 98, 5)
print "20:24 el númberu 20 apaez nel intervalu: " & retStr
retStr = Partition(20, 0, 99, 1)
print " 20: 20 el númberu 20 apaez nel intervalu: " & retStr
retStr = Partition(120, 0, 99, 5)
print "100: el númberu 120 apaez nel intervalu: " & retStr
retStr = Partition(-5, 0, 99, 5)
print " : -1 el númberu −5 apaez nel intervalu: " & retStr
retStr = Partition(2, 0, 5, 2)
print " 2: 3 el númberu 2 apaez nel intervalu: " & retStr
End Sub