ການຊ່ວຍເຫຼືອ LibreOfficeDev 27.2
Returns the text that occurs before the start of given instance of a delimiter substring.
TEXTBEFORE( Text [; Delimiter [; Instance Number [; Match Mode [; Match End [; If Not Found ]]]]])
Text: ຂໍ້ຄວາມຕົ້ນສະບັບ.
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
Match Mode: (ທາງເລືອກ) ຕັ້ງເປັນ 1 ເພື່ອສົມທຽບແບບບໍ່ຈຳແນກຕົວພິມໃຫຍ່-ນ້ອຍ. ຄ່າມາດຕະຖານແມ່ນ 0.
Match End: (ທາງເລືອກ) ຕັ້ງເປັນ 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("To be or not to be";"question";1;0;0;"@@@") ສົ່ງຄືນຂໍ້ຄວາມ "@@@" ເພາະວ່າບໍ່ມີຕົວຂັ້ນ "question" ໃນຂໍ້ຄວາມຕົ້ນທາງ.
=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.
COM.MICROSOFT.TEXTBEFORE