Using Wildcards in Formulas

A helyettesítő karakterek olyan speciális karakterek, amelyeket a Calc függvények keresési karakterláncaiban lehet használni. A Keresés és csere párbeszédablakban is használhatók keresési feltételek meghatározására. A helyettesítő karakterek használata lehetővé teszi, hogy egyetlen keresési karakterlánccal fejlettebb keresési paramétereket határozzunk meg.

LibreOffice Calc supports either wildcards or regular expressions as arguments depending on the current application settings. By default LibreOffice Calc is set to support wildcards instead of regular expressions.

tip

Annak biztosításának érdekében, hogy a helyettesítő karakterek támogatottak legyenek, válassza a menüparancsot és ellenőrizze, hogy a Helyettesítő karakterek engedélyezése a képletekben opció be van-e jelölve. Megjegyzendő, hogy ebben a párbeszédablakban a Reguláris kifejezések engedélyezése a képletekben opciót is engedélyezheti, vagy a helyettesítő karakterek és a reguláris kifejezések támogatását is megszüntetheti.


The following wildcards are supported:

Helyettesítő karakter

Leírás

? (question mark)

Matches any single character. For example, the search string "b?g" matches “bag” and “beg” but will not match "boog" or "mug".

Note that it will not match "bg" as well, since "?" must match exactly one character. The "?" wildcard does not correspond to a zero-character match.

* (csillag)

Matches any sequence of characters, including an empty string. For example, the search string "*cast" will match “cast”, “forecast”, and “outcast”, but will not match "forecaster" using default LibreOffice settings.

If the option Search criteria = and <> must apply to whole cells is disabled in , then "forecaster" will be a match using the "*cast" search string.

~ hullámjel

Escapes the special meaning of a question mark, asterisk, or tilde character that follows immediately after the tilde character.

For example, the search string "why~?" matches “why?” but will not match "whys" nor "why~s".


tip

A LibreOffice Calc és a Microsoft Excel támogatja a helyettesítő karaktereket. Ezért, ha a két alkalmazás közötti átjárhatóságra van szükség, a reguláris kifejezések helyett a helyettesítő karakterekkel való munkavégzést válassza. Ezzel szemben, ha nincs szükség az átjárhatóságra, fontolja meg a reguláris kifejezések használatát a hatékonyabb keresési lehetőségek érdekében.


Supported Spreadsheet Functions

Wildcards are supported by the following spreadsheet functions:

Examples of Wildcards in Formulas

The following examples consider that the options Enable wildcards in formulas and Search criteria = and <> must apply to whole cells are enabled in .

=COUNTIF(A1:A10;"Chi*") counts the number of cells in the range A1:A10 containing strings that start with "Chi" followed by zero or more characters.

=SUMIF(A1:A5;"A??";B1:B5) sums the values in B1:B5 whose corresponding values in A1:A5 start with "A" followed by exactly two other characters.

note

Wildcard comparisons are not case sensitive, hence "A?" will match both "A1" and "a1".


Támogasson minket!