Search Mode: (optional) specifies the search mode to use.
1: returns the first occurrence starting from the first item of Search Array (default).
-1: reverse search. Returns the first occurrence starting from the last item of Search Array.
2: binary search that relies on Search Array being sorted in ascending order. If not sorted, invalid results will be returned.
-2: binary search that relies on Search Array being sorted in descending order. If not sorted, invalid results will be returned.
Match Mode values 2 and 3 cannot be combined with binary search (Search Mode value 2 or -2).
Es pot ometre qualsevol dels arguments opcionals. Un argument opcional requereix que tots els separadors anteriors estiguin presents.
Exemples
Suposem que hem creat una petita taula de base de dades que ocupa l'interval de cel·les A1:DO4 i que conté informació bàsica sobre 118 elements químics. La primera columna conté les capçaleres de les files «Element», «Símbol», «Nombre atòmic» i «Massa atòmica relativa». Les columnes següents contenen la informació pertinent per a cadascun dels elements, ordenats d'esquerra a dreta per nombre atòmic. Per exemple, les cel·les B1:B4 contenen «Hidrogen», «H», «1» i «1,008», mentre que les cel·les DO1:DO4 contenen «Oganessó», «Og», «118» i «294».
A
B
C
D
...
DO
1
Element
Hidrogen
Heli
Liti
...
Oganessó
2
Símbol
H
He
Li
...
Og
3
Nombre atòmic
1
2
3
...
118
4
Massa atòmica relativa
1.008
4.0026
6.94
...
294
=XMATCH("Atomic Number"; A1:A4) returns 3, the third line of the A1:A4 array.
=XMATCH("Li"; A2:DO2) returns 4, the fourth column of the A2:DO2 array.
Informació tècnica
El LibreOfficeDev inclou aquesta funció des de la versió 24.8.
This function is NOT part of the Open Document Format for Office Applications (OpenDocument) Version 1.4. Part 4: Recalculated Formula (OpenFormula) Format standard. The name space is