TEXTBEFORE

Returns the text that occurs before the start of given instance of a delimiter substring.

Σύνταξη

TEXTBEFORE( Κείμενο [; Οριοθέτης [; Αριθμός παρουσίας [; Λειτουργία αντιστοίχισης [; Τέλος αντιστοίχισης [; Εάν δεν βρεθεί ]]]]])

Κείμενο: το αρχικό κείμενο.

Delimiter: (optional) the delimiter. Multiple delimiters can be supplied. If omitted or supplied as an empty string, then returns the error #N/A or the value expressed by If Not Found.

Instance Number: (optional) the instance of the delimiter before which to extract text. The default is 1. A negative number starts searching from the end. Value 0 returns the error #N/A

Λειτουργία αντιστοίχισης: (προαιρετικό) ορίστε την σε 1 για να εκτελέσετε αντιστοίχιση χωρίς διάκριση πεζών-κεφαλαίων. Η προεπιλογή είναι 0.

Τέλος αντιστοίχισης: (προαιρετικό) ορίστε την τιμή 1 για να θεωρήσετε το τέλος του κειμένου ως οριοθέτη. Η προεπιλογή είναι 0.

If Not Found: (optional) the value returned if no match is found. The default is #N/A.

Εικονίδιο σημείωσης

Οποιοδήποτε από τα προαιρετικά ορίσματα μπορεί να παραλειφθεί. Ένα προαιρετικό όρισμα απαιτεί να υπάρχουν όλα τα προηγούμενα διαχωριστικά.


Παραδείγματα

=TEXTBEFORE("To be or not to be";" be";2;0;0;"@@@") επιστρέφει τη συμβολοσειρά "To be or not to", καταλαμβάνοντας τη δεύτερη παρουσία του οριοθέτη "be".

=TEXTBEFORE("Να είσαι ή να μην είσαι";"ερώτηση";1;0;0;"@@@") επιστρέφει το κείμενο "@@@" επειδή ο οριοθέτης "ερώτηση" δεν υπάρχει στο κείμενο προέλευσης.

=TEXTBEFORE("To be or not to be";"question";1;0;1;"@@@") returns the text "To be or not to be" because the delimiter "question" is not in the source text and Match End is 1, which then returns everything before the end of text.

=TEXTBEFORE("To be or not to be";"question";-1;0;1;"@@@") returns the empty string "" because the delimiter "question" is not in the source text, Instance Number is negative (starts from the end) and Match End is 1, which prevents the function to return the error #N/A or the value defined in If Not Found.

Τεχνικές πληροφορίες

Εικονίδιο συμβουλής

This function is available since LibreOfficeDev 25.8.


Αυτή η συνάρτηση ΔΕΝ αποτελεί μέρος του προτύπου Open Document Format for Office Applications (OpenDocument) Έκδοση 1.3. Μέρος 4: Επανυπολογισμένη μορφή τύπου (OpenFormula). Ο χώρος ονομάτων είναι

COM.MICROSOFT.TEXTBEFORE

Παρακαλούμε, υποστηρίξτε μας!

Παρακαλούμε, υποστηρίξτε μας!