Text Functions

This section contains descriptions of the Text functions.

བརྡ་བཀོད་འདི་འཛུལ་སྤྱོད་འབད་ནི་ལུ...

བཙུགས་ - ལས་འགན་ - དབྱེ་རིམ་ ཚིག་ཡིག་


Using double quotation marks in formulas

To include a text string in a formula, place the text string between two double quotation marks (") and Calc takes the characters in the string without attempting to interpret them. For example, the formula ="Hello world!" displays the text string Hello world! in the cell, with no surrounding double quotation marks.

The more complex formula =CONCATENATE("Life is really simple, "; "but we insist on making it complicated "; "(Confucius).") concatenates three individual strings in double quotation marks, outputting Life is really simple, but we insist on making it complicated (Confucius).

To place a literal double quotation mark within a string inside a formula, two methods can be used:

  1. You can "escape" the double quotation mark with an additional double quotation mark, and Calc treats the escaped double quotation mark as a literal value. For example, the formula ="My name is ""John Doe""." outputs the string My name is "John Doe". Another simple example is the formula =UNICODE("""") which returns 34, the decimal value of the Unicode quotation mark character (U+0022) — here the first and fourth double quotation marks indicate the beginning and end of the string, while the second double quotation mark escapes the third.

  2. You can use the CHAR function or the UNICHAR function to insert a double quotation mark. For example, the formula =UNICHAR(34) & "The Catcher in the Rye" & UNICHAR(34) & " is a famous book by J. D. Salinger." displays the string "The Catcher in the Rye" is a famous book by J. D. Salinger.

Be aware that Calc's AutoCorrect function may modify double quotation marks. AutoCorrect should not change the double quotation marks within formula cells but may change those used in non-formula cells containing text. For example, if you copy a string that is surrounded by some other form of typographical double quotation marks, such as the left double quotation mark (U+201C) and the right double quotation mark (U+201D), and then paste into a formula cell, an error may result. Open the Double Quotes area of the Tools - AutoCorrect Options - Localized Options dialog to set the characters used to automatically correct the start and end typographical double quotation marks. Uncheck the Replace toggle button to disable the feature.

ARABIC

Returns the numeric value corresponding to a Roman number expressed as text.

ASC

Converts double-byte (full-width) characters to single-byte (half-width) ASCII and katakana characters.

JIS

Converts single-byte (half-width) ASCII or katakana characters to double-byte (full-width) characters.

REGEX

Matches and extracts or optionally replaces text using regular expressions.

ROMAN

Converts a number into a Roman numeral. The value range must be between 0 and 3999. A simplification mode can be specified in the range from 0 to 4.

VALUE

Converts the string representation of a number to numeric form. If the supplied string is a valid date, time, or date-time, the corresponding date-time serial number is returned.

WEBSERVICE

Get some web content from a URI.

FILTERXML

Apply a XPath expression to a XML document.

ENCODEURL

Returns a URL-encoded string.

BASE

Converts a positive integer to a specified base into a text from the numbering system. The digits 0-9 and the letters A-Z are used.

Syntax

BASE(Number; Radix [; MinimumLength])

ཨང་གྲངས་ དེ་ གཞི་བསྒྱུར་འབད་ནི་ཨིན་པའི་ ཧྲིལ་ཨང་ཡོད་ཆ་ཨིན།

Radix indicates the base of the numeral system. It may be any positive integer between 2 and 36.

རིང་ཚད་ཉུང་མཐའ་ (གདམ་ཁ་ཅན་) གིས་ གསར་བསྐྲུན་འབད་ཡོད་པའི་ ཡིག་འབྲུའི་འབྱུང་རིམ་གྱི་ རིང་ཚད་ཉུང་མཐའ་གཏན་འབེབས་བཟོཝ་ཨིན། ཚིག་ཡིག་དེ་ བརྡ་སྟོན་འབད་ཡོད་པའི་རིང་ཚད་ཉུང་མཐའ་ལས་ཐུང་པ་ཅིན་ ཡིག་རྒྱུན་གྱི་ གཡོན་ག་ཐུག་ལུ་ ཀླད་ཀོར་ཚུ་ཁ་སྐོང་བརྐྱབ་སྟེ་ཡོདཔ་ཨིན།

Example

=BASE(17;10;4) returns 0017 in the decimal system.

=BASE(17;2) returns 10001 in the binary system.

ལུ་གཞི་བསྒྱུར་འབད་དོ།

=BASE(255;16;4) returns 00FF in the hexadecimal system.

See also

DECIMAL

CHAR

ད་ལྟོའི་ཨང་རྟགས་ཐིག་ཁྲམ་དང་འཁྲིལ་ཏེ་ ཨང་གྲངས་དེ་ ཡིག་འབྲུ་ལུ་གཞི་བསྒྱུར་འབདཝ་ཨིན། ཨང་གྲངས་དེ་ ཧྲིལ་ཨང་ ཨང་ཡིག་གཉིས་ ཡང་ན་ ཨང་ཡིག་གསུམ་བཏུབ་ཨིན།

Codes greater than 127 may depend on your system's character mapping (for example iso-8859-1, iso-8859-2, Windows-1252, Windows-1250), and hence may not be portable.

Syntax

CHAR(ཨང་།)

ཨང་ འདི་ ༡ དང་ ༢༥༥ བར་ཡིག་འབྲུ་དོན་ལུ་གནས་གོང་ཨང་རྟགས་ཁྱད་ཚབ་འབད་བའི་ཨང་གྲངས་ཨིན།

Example

=CHAR(100) returns the character d.

="abc" & CHAR(10) & "def" inserts a newline character into the string.

CLEAN

ཡིག་རྒྱུན་ནང་ལས་ དཔར་བསྐྲུན་མེན་པའི་ཡིག་འབྲུ་ཚུ་ཆ་མཉམ་རང་རྩ་བསྐྲད་གཏང་ཡོདཔ་ཨིན།

Syntax

CLEAN(ཚིག་ཡིག)

ཚིག་ཡིག་ དེ་ དཔར་བསྐྲུན་འབད་མ་བཏུབ་མི་ཡིག་འབྲུ་ཚུ་རྩ་བསྐྲད་གཏང་ནིའི་ ཚིག་ཡིག་ལུ་གཞི་བསྟུན་འབདཝ་ཨིན།

Example

=LEN(CLEAN(CHAR(7) & "LibreOffice Calc" & CHAR(8))) returns 16, showing that the CLEAN function removes the non-printable Unicode U+0007 ("BEL") and U+0008 ("BS") characters at the beginning and end of the string argument. CLEAN does not remove spaces.

CODE

ཚིག་ཡིག་ ཡིག་རྒྱུན་ནང་ལུ་ ཡིག་འབྲུ་དང་པམ་དོན་ལུ་ ཨང་གྲངས་ཀྱི་ཨང་རྟགས་སླར་ལོག་འབདཝ་ཨིན།

Syntax

CODE(ཚིག་ཡིག)

ཚིག་ཡིག་ དེ་ ཡིག་འབྲུ་དང་པའི་ཨང་རྟགས་དེ་འཐོབ་ནི་ཨིན་པའི་ཚིག་ཡིག་ཨིན།

Codes greater than 127 may depend on your system's character mapping (for example iso-8859-1, iso-8859-2, Windows-1252, Windows-1250), and hence may not be portable.

Example

=CODE("Hieronymus") returns 72, =CODE("hieroglyphic") returns 104.

note

ནཱ་ལུ་ལག་ལེན་འཐབ་ཡོད་པའི་ ཨང་རྟགས་དེ་ ASCII ལུ་ གཞི་བསྟུན་འབདཝ་མེན་པར་ སྐབས་བབས་མངོན་གསལ་འབད་ཡོད་པའི་ཐིག་ཁྲམ་ཨང་རྟགས་ཨིན།


CONCATENATE

ཡིག་རྒྱུན་གཅིག་ནང་ན་ཚིག་ཡིག་ ཡིག་རྒྱུན་ལེ་ཤ་མཉམ་མཐུད་འབདཝ་ཨིན།

Syntax

CONCATENATE(String 1 [; String 2 [; … [; String 255]]])

String 1[; String 2][; … ;[String 255]] are strings or references to cells containing strings.

Example

=CONCATENATE("Good ";"Morning ";"Mrs. ";"Doe") returns: Good Morning Mrs. Doe.

DECIMAL

Converts text that represents a number in a numeral system with the given base radix to a positive integer. The radix must be in the range 2 to 36. Spaces and tabs are ignored. The Text field is not case-sensitive.

If the radix is 16, a leading x or X or 0x or 0X, and an appended h or H, are disregarded. If the radix is 2, an appended b or B is disregarded. Other characters that do not belong to the numeral system generate an error.

Syntax

DECIMAL(ཚིག་ཡིག རཱ་ཌིགསི།)

Text is the text to be converted.

Radix indicates the base of the numeral system. It may be any positive integer between 2 and 36.

Example

=DECIMAL("17";10) returns 17.

=DECIMAL("FACE";16) returns 64206.

=DECIMAL("0101";2) returns 5.

See also

BASE

DOLLAR

Converts a number to a string representing the amount in the currency format, rounded to a specified decimal places, using the decimal separator that corresponds to the current locale setting. In the Value field enter the number to be converted. Optionally, you may enter the number of decimal places in the Decimals field. If no value is specified, all numbers in currency format will be displayed with two decimal places.

ཁྱོད་རའི་ རིམ་ལུགས་སྒྲིག་སྟངས་ཚུ་ནང་ དངུལ་རྩ་སྒྲིག་གཞི་སྒྲིག་འབད།

Syntax

DOLLAR(Value [; Decimals])

གསན་གོང་དེ་ ཨང་གྲངས་ ཡང་ན་ ནང་ན་ཨང་གྲངས་ཤེམ་ཏེ་ཡོད་པའི་ནང་ཐིག་ལུ་གཞི་བསྟུན་ནམ་ ཨང་གྲངས་སླར་ལོག་འབད་བའི་མན་ངག་ཨིན།

བཅུ་ཚག་ཚུ་ བཅུ་ཚག་ས་གནས་ཚུའི་ གདམ་ཁ་ཨང་གྲངས་ཨིན།

Example

=DOLLAR(255) returns $255.00 for the English (USA) locale and USD (dollar) currency; ¥255.00 for the Japanese locale and JPY (yen) currency; or 255,00 € for the German (Germany) locale and EUR (euro) currency.

=DOLLAR(367.456;2) returns $367.46.

EXACT

ཡིག་རྒྱུན་གཉིས་ག་བསྡུར་འབད་བཞིནམ་ལས་ དེ་ཚུ་དབྱེར་མེད་ཨིན་པ་ཅིན་ TRUE སླར་ལོག་འབདཝ་ཨིན། འ་ནི་ལས་འགན་དེ་ གནས་སྟངས་ཞིབ་རྟོགས་ཅན་ཨིན།(-s)

Syntax

EXACT("Text1"; "Text2")

text_1 དེ་ ག་བསྡུར་འབད་ནི་ཨིན་པའི་ ཚིག་ཡིག་དང་པམ་ལུ་གཞི་བསྟུན་འབདཝ་ཨིན།

text_2 དེ་ ག་བསྡུར་འབད་ནི་ཨིན་པའི་ ཚིག་ཡིག་གཉིས་པམ་ཨིན།

Example

=EXACT("microsystems";"Microsystems") returns FALSE.

FIND

Returns the position of a string of text within another string.You can also define where to begin the search. The search term can be a number or any string of characters. The search is case-sensitive.

Syntax

FIND("FindText"; "Text" [; Position])

འཚོལ་_ཚིག་ཡིག་ དེ་ འཐོབ་ནི་ཨིན་པའི་ཚིག་ཡིག་ལུ་གཞི་བསྟུན་འབདཝ་ཨིན།

ཚིག་ཡིག་ དེ་ འཚོལ་ཞིབ་དེ་འབད་བའི་ཚིག་ཡིག་ཨིན།

གནས་ས་ (གདམ་ཁ་ཅན་) དེ་ འཚོལ་ཞིབ་འགོ་བཙུགས་པའི་ ཚིག་ཡིག་ནང་གི་གནས་ས་ཨིན།

Example

=FIND(76;998877665544) returns 6.

FIXED

Returns a number as text with a specified number of decimal places and optional thousands separators.

Syntax

FIXED(Number; [Decimals = 2 [; NoThousandsSeparators = FALSE]])

Number is rounded to Decimals places (after the decimal separator) and the result formatted as text, using locale-specific settings.

Decimals (optional) refers to the number of decimal places to be displayed. If Decimals is negative, Number is rounded to ABS(Decimals) places to the left from the decimal point. If Decimals is a fraction, it is truncated actually ignoring what is the closest integer.

NoThousandsSeparators (optional) determines whether the thousands separator is used. If it is TRUE or non-zero, then group separators are omitted from the resulting string. If the parameter is equal to 0 or if it is missing altogether, the thousands separators of your current locale setting are displayed.

Example

=FIXED(1234567.89;3) returns 1,234,567.890 as a text string.

=FIXED(123456.789;;TRUE) returns 123456.79 as a text string.

=FIXED(12345.6789;-2) returns 12,300 as a text string.

=FIXED(12134567.89;-3;1) returns 12135000 as a text string.

=FIXED(12345.789;3/4) returns 12,346 as a text string.

=FIXED(12345.789;8/5) returns 12,345.8 as a text string.

LEFT

ཡིག་འབྲུ་དང་པ་ཡང་ན་ ཚིག་ཡིག་གི་ཡིག་འབྲུ་ཚུ་སླར་ལོག་འབདཝ་ཨིན།

Syntax

LEFT("Text" [; Number])

ཚིག་ཡིག་འདི་ འགོ་ཐོག་ཆ་ཤས་མིང་ཚིག་ཚུ་ གཏན་འབེབ་བཟོ་ནི་ཡོད་པའི་ ཚིག་ཡིག་ཨིན།

ཨང་ (གདམ་ཁ་ཅན་) གྱིས་ ཚིག་ཡིག་འགོ་བཙུགས་དོན་ལུ་ ཡིག་འབྲུའི་གྱངས་ཁ་ གསལ་བཀོད་འབདཝ་ཨིན། འ་ནི་ཚད་བཟུང་འདི་ ངེས་འཛིན་འབད་དེ་མེད་པ་ཅིན་ ཡིག་འབྲུ་གཅིག་སླར་ལོག་འབད་ཡོདཔ་ཨིན།

Example

=LEFT("output";3) returns “out”.

LEFTB

Returns the first characters of a DBCS text.

tip

This function is available since LibreOffice 4.2.


Syntax

LEFTB("Text" [; Number_bytes])

Text is the text where the initial partial words are to be determined.

Number_bytes (optional) specifies the number of characters you want LEFTB to extract, based on bytes. If this parameter is not defined, one character is returned.

Example

=LEFTB("中国";1) returns " " (1 byte is only half a DBCS character and a space character is returned instead).

=LEFTB("中国";2) returns "中" (2 bytes constitute one complete DBCS character).

=LEFTB("中国";3) returns "中 " (3 bytes constitute one DBCS character and a half; the last character returned is therefore a space character).

=LEFTB("中国";4) returns "中国" (4 bytes constitute two complete DBCS characters).

=LEFTB("office";3) returns "off" (3 non-DBCS characters each consisting of 1 byte).

LEN

བར་སྟོང་ཚུ་གྲངས་སུ་བཙུགས་ཏེ་ ཡིག་རྒྱུན་གྱི་ རིང་ཚད་སླར་ལོག་འབདཝ་ཨིན།

Syntax

CLEAN(ཚིག་ཡིག)

ཚིག་ཡིག་འདི་ རིང་ཚད་གཏན་འབེབ་བཟོ་ནི་ཨིན་པའི་ ཚིག་ཡིག་ཨིན།

Example

=LEN("Good Afternoon") returns 14.

=LEN(12345.67) returns 8.

LENB

For double-byte character set (DBCS) languages, returns the number of bytes used to represent the characters in a text string.

tip

This function is available since LibreOffice 4.2.


Syntax

LENB("Text")

ཚིག་ཡིག་འདི་ རིང་ཚད་གཏན་འབེབ་བཟོ་ནི་ཨིན་པའི་ ཚིག་ཡིག་ཨིན།

Example

LENB("中") returns 2 (1 DBCS character consisting of 2 bytes).

LENB("中国") returns 4 (2 DBCS characters each consisting of 2 bytes).

LENB("office") returns 6 (6 non-DBCS characters each consisting of 1 byte).

=LENB("Good Afternoon") returns 14.

=LENB(12345.67) returns 8.

LOWER

ཚིག་ཡིག་ཡིག་རྒྱུན་ནང་གི་ ཚུགས་ཡིག་ཚུ་མགྱོགས་ཡིག་ནང་གཞི་བསྒྱུར་འབདཝ་ཨིན།

Syntax

LOWER(ཚིག་ཡིག)

ཚིག་ཡིག་ འདི་ གཞི་བསྒྱུར་འབད་ནི་ཨིན་པའི་ ཚིག་ཡིག་ལུ་གཞི་བསྟུན་འབདཝ་ཨིན།

Example

=LOWER("Sun") returns sun.

MID

དེ་གིས་ ཚིག་ཡིག་གི་ཚིག་ཡིག་ཡིག་རྒྱུན་ཅིག་སླར་ལོག་འབདཝ་ཨིན། ཚད་བཟུང་དེ་གིས་འགོ་བཙུག་པའི་གནས་ས་དང་ཡིག་འབྲུ་ཚུ་གི་ཨང་གྲངས་འདི་གསལ་བཀོད་འབདཝ་ཨིན།

Syntax

MID(ཚིག་ཡིག་; འགོ་བཙུགས་; ཨང་།)

ཚིག་ཡིག་ འདི་ ནང་ན་ ཕྱིར་འདོན་འབད་ནིའི་ཡིག་འབྲུ་ཚུ་ཤོམ་ཏེ་ཡོད་པའི་ ཚིག་ཡིག་ཨིན།

འགོ་བཙུགས་ འདི་ ཚིག་ཡིག་ནང་ ཕྱིར་འདོན་འབད་ནིའི་ གནས་ས་གི་ཡིག་འབྲུ་དང་པམ་ཨིན།

ཨང་ གིས་ ཚིག་ཡིག་ཡན་ལག་ནང་ཡོད་པའི་ཡིག་འབྲུ་ཚུའི་གྱངས་ཁ་གསལ་བཀོད་འབདཝ་ཨིན།

Example

=MID("office";2;2) returns ff.

MIDB

Returns a text string of a DBCS text. The parameters specify the starting position and the number of characters.

tip

This function is available since LibreOffice 4.2.


Syntax

MIDB("Text"; Start; Number_bytes)

ཚིག་ཡིག་ འདི་ ནང་ན་ ཕྱིར་འདོན་འབད་ནིའི་ཡིག་འབྲུ་ཚུ་ཤོམ་ཏེ་ཡོད་པའི་ ཚིག་ཡིག་ཨིན།

Start is the position of the first character in the text to extract.

Number_bytes specifies the number of characters MIDB will return from text, in bytes.

Example

=MIDB("中国";1;0) returns "" (0 bytes is always an empty string).

=MIDB("中国";1;1) returns " " (1 byte is only half a DBCS character and therefore the result is a space character).

=MIDB("中国";1;2) returns "中" (2 bytes constitute one complete DBCS character).

=MIDB("中国";1;3) returns "中 " (3 bytes constitute one and a half DBCS character; the last byte results in a space character).

=MIDB("中国";1;4) returns "中国" (4 bytes constitute two complete DBCS characters).

=MIDB("中国";2;1) returns " " (byte position 2 is not at the beginning of a character in a DBCS string; 1 space character is returned).

=MIDB("中国";2;2) returns " " (byte position 2 points to the last half of the first character in the DBCS string; the 2 bytes asked for therefore constitutes the last half of the first character and the first half of the second character in the string; 2 space characters are therefore returned).

=MIDB("中国";2;3) returns " 国" (byte position 2 is not at the beginning of a character in a DBCS string; a space character is returned for byte position 2).

=MIDB("中国";3;1) returns " " (byte position 3 is at the beginning of a character in a DBCS string, but 1 byte is only half a DBCS character and a space character is therefore returned instead).

=MIDB("中国";3;2) returns "国" (byte position 3 is at the beginning of a character in a DBCS string, and 2 bytes constitute one DBCS character).

=MIDB("office";2;3) returns "ffi" (byte position 2 is at the beginning of a character in a non-DBCS string, and 3 bytes of a non-DBCS string constitute 3 characters).

PROPER

ཚིག་ཡིག་ཡིག་རྒྱུན་གྱི་ མིང་ཚིག་ཚུ་ཆ་མཉམ་ནང་ཡིག་གུ་དང་པམ་དེ་ཚུགས་ཡིག་བཟོཝ་ཨིན།

Syntax

PROPER(ཚིག་ཡིག)

ཚིག་ཡིག་ འདི་ གཞི་བསྒྱུར་འབད་ནི་ཨིན་པའི་ ཚིག་ཡིག་ལུ་གཞི་བསྟུན་འབདཝ་ཨིན།

Example

=PROPER("the document foundation") returns The Document Foundation.

REPLACE

ཚིག་ཡིག་ ཡིག་རྒྱུན་གྱི་ ཆ་ཤས་གཅིག་ ཚིག་ཡིག་ ཡིག་རྒྱུན་སོ་སོར་གཅིག་དང་གཅིག་ཁར་ཚབ་བཙུགས་འབདཝ་ཨིན། འ་ནི་ལས་འགན་དེ་ ཡིག་འབྲུ་དང་ཨང་གྲངས་ཚུ་གཉིས་ཆ་རང་ཚབ་བཙུགས་འད་ནིའི་དོན་ལུ་ ལག་ལེན་འཐབ་བཏུབ་ཨིན། (རང་བཞིན་གྱིས་ཚིག་ཡིག་ལུ་གཞི་བསྒྱུར་འབད་ཡོད་མི་ཚུ།) ལས་འགན་གྱི་གྲུབ་འབྲས་དེ་ ཨ་རྟག་རང་ ཚིག་ཡིག་སྦེ་བཀྲམ་སྟོན་འབད་ཡོདཔ་ཨིན། ཁྱོད་ཀྱིས་ ཚིག་ཡིག་གིས་ཚབ་བཙུགས་འབདཡོདཔའི་ཨང་གྲངས་དང་གཅིག་ཁར་ཧེང་སྐལ་རང་ ལཱ་འགན་འགྲུབ་ནི་མནོ་བ་ཅིན་ ཁྱོད་ཀྱིས་ VALUE ལས་འགན་ ལག་ལེན་ཐོག་ལས་ དེ་ཚུ་ ལོག་སྟེ་རང་ཨང་གྲང་ལུ་གཞི་བསྒྱུར་འབད་དགོཔ་ཨིན།

ཁྱོད་ཀྱིས་ ཚིག་ཡིག་དེ་ ཨང་གྲངས་སྦེ་ཁ་སྒྱུར་དང་ རང་བཞིན་གྱིས་ ཚིག་ཡིག་ལུ་གཞི་བསྒྱུར་འབད་དེ་མིན་དགོ་ནི་ཨིན་པ་ཅིན་ ནང་ན་ཨང་གྲངས་ཚུ་ཤོམ་ཏེ་ཡོད་པའི་ཚིག་ཡིག་གང་རུང་དེ་ འདྲེན་ཚིག་རྟགས་ཚུ་ནང་ན་བཙུགས་དགོཔ་ཨིན།

Syntax

REPLACE(ཚིག་ཡིག གནས་ས། རིང་ཚད། ཚིག་ཡིག་གསརཔ།)

ཚིག་ཡིག་འདི་ ཡན་ལག་ཚབ་བཙུགས་འབད་ནི་ཨིན་པའི་ ཚིག་ཡིག་ལུ་གཞི་བསྟུན་འབདཝ་ཨིན།

གནས་ས་ འདི་ ཚབ་བཙུགས་ལཱ་འགོ་བཙུགས་ནི་ཨིན་པའི་ ཚིག་ཡིག་ནང་འཁོད་ཀྱི་ གནས་ས་ལུ་གཞི་བསྟུན་འབདཝ་ཨིན།

རིང་ཚད་ འདི་ ཚབ་བཙུགས་འབད་ནི་ཨིན་པའི་ is the number of characters in ཚིག་ཡིག་ནང་གི་ ཡིག་འབྲུ་ཚུའི་ གྱངས་ཁ་ཨིན།

ཚིག་ཡིག་གསརཔ་དེ་ ཚིག་ཡིག་ཚབ་བཙུགས་ འབད་བའི་ཚིག་ཡིག་ལུ་གཞི་བསྟུན་ འབདཝ་ཨིན།

Example

=REPLACE("1234567";1;1;"444") returns "444234567". One character at position 1 is replaced by the complete NewText.

REPT

གྲ་སྒྲིག་འབད་ཡོད་པའི་ འདྲ་བཤུས་ཚུའི་གྱངས་ཁ་གིས་ ཡིག་འབྲུ་ཡིག་རྒྱུན་ ཡང་བསྐྱར་འབདཝ་ཨིན།

Syntax

REPT(ཚིག་ཡིག་; ཨང་།)

ཚིག་ཡིག་ འདི་ ཡང་བསྐྱར་འབད་ནི་ཨིན་པའི་ཚིག་ཡིག་ཨིན།

གྱངས་ཁ་དེ་ བསྐྱར་ཟློས་ཚུའི་གྱངས་ཁ་ཨིན།

Example

=REPT("Good morning";2) returns Good morningGood morning.

tip

Refer to the REPT wiki page for more details about this function.


RIGHT

དེ་གིས་ མཇུག་གི་ཡིག་འབྲུ་དང་ ཡང་ན་ ཚིག་ཡིག་ཅིག་གི་ཡིག་འབྲུ་འདི་སླར་ལོག་འབདཝ་ཨིན།

Syntax

RIGHT("Text" [; Number])

ཚིག་ཡིག་ དེ་ ཡན་ལག་གཡསཔ་དེ་གཏན་འབེབས་བཟོ་ནི་ཨིན་པའི་ཚིག་ཡིག་ཨིན།

Number (optional) is the number of characters from the right part of the text. If this parameter is not defined, one character is returned.

Example

=RIGHT("Sun";2) returns un.

RIGHTB

Returns the last character or characters of a text with double bytes characters sets (DBCS).

tip

This function is available since LibreOffice 4.2.


Syntax

RIGHTB("Text" [; Number_bytes])

Text is the text of which the right part is to be determined.

Number_bytes (optional) specifies the number of characters you want RIGHTB to extract, based on bytes. If this parameter is not defined, one byte is returned.

Example

RIGHTB("中国";1) returns " " (1 byte is only half a DBCS character and a space character is returned instead).

RIGHTB("中国";2) returns "国" (2 bytes constitute one complete DBCS character).

RIGHTB("中国";3) returns " 国" (3 bytes constitute one half DBCS character and one whole DBCS character; a space is returned for the first half).

RIGHTB("中国";4) returns "中国" (4 bytes constitute two complete DBCS characters).

RIGHTB("office";3) returns "ice" (3 non-DBCS characters each consisting of 1 byte).

SEARCH

Returns the position of a text segment within a character string. You can set the start of the search as an option. The search text can be a number or any sequence of characters. The search is not case-sensitive. If the text is not found, returns error 519 (#VALUE).

The search supports wildcards or regular expressions. With regular expressions enabled, you can enter "all.*", for example to find the first location of "all" followed by any characters. If you want to search for a text that is also a regular expression, you must either precede every regular expression metacharacter or operator with a "\" character, or enclose the text into \Q...\E. You can switch the automatic evaluation of wildcards or regular expression on and off in - LibreOffice Calc - Calculate.

warning

When using functions where one or more arguments are search criteria strings that represents a regular expression, the first attempt is to convert the string criteria to numbers. For example, ".0" will convert to 0.0 and so on. If successful, the match will not be a regular expression match but a numeric match. However, when switching to a locale where the decimal separator is not the dot makes the regular expression conversion work. To force the evaluation of the regular expression instead of a numeric expression, use some expression that can not be misread as numeric, such as ".[0]" or ".\0" or "(?i).0".


Syntax

SEARCH("FindText"; "Text" [; Position])

find_text དེ་ འཚོལ་ཞིབ་འབད་ནི་ཨིན་པའི་ ཚིག་ཡིག་ཨིན།

ཚིག་ཡིག་ དེ་ འཚོལ་ཞིབ་འབད་ནི་ཨིན་སའི་ཚིག་ཡིག་ཨིན།

གནས་ས་ (གདམ་ཁ་ཅན་) དེ་ འཚོལ་ཞིབ་འགོ་བཙུགས་ནི་ཨིན་སའི་ཚིག་ཡིག་ནང་གནས་ས་ཨིན།

Example

=SEARCH(54;998877665544) returns 10.

SUBSTITUTE

ཡིག་རྒྱུན་ནང་ ཚིག་ཡིག་རྙིངམ་དོན་ལུ་ཚིག་ཡིག་གསརཔ་གིས་ ཚབ་བཙུགསཔ་ཨིན།

Syntax

SUBSTITUTE("Text"; "SearchText"; "NewText" [; Occurrence])

ཚིག་ཡིག་ དེ་ ཚིག་ཡིག་ཆ་ཤས་ཚུ་བརྗེ་སོར་འབད་ནི་ཨིན་པའི་ཚིག་ཡིག་ཨིན།

search_text དེ་ ཚབ་བཙུགས་འབད་ནི་ཨིན་པའི་ཚིག་ཡིག་ཆ་ཤས་ཨིན་(དུས་ཚོད་ཚུའི་གྱངས་ཁ།)

ཚིག་ཡིག་གསརཔ་ དེ་ ཚིག་ཡིག་ཆ་ཤས་ཚབ་བཙུགས་འབད་ནི་ཨིན་པའི་ཚིག་ཡིག་ཨིན།

འབྱུང་བ་ (གདམ་ཁ་ཅན་) གིས་ འཚོལ་ཞིབ་ཚིག་ཡིག་འདི་གི་འབྱུང་བ་ག་འདི་ ཚབ་བཙུགས་ནི་ཨིན་ན་ བརྡ་སྟོན་འབདཝ་ཨིན། འནི་ཚད་བཟུང་འདི་བརླག་སྟོར་ཞུགས་ཡོདཔ་ཨིན་པ་ཅིན་ འཚོལ་ཞིབ་ཚིག་ཡིག་འདི་ ག་ར་ལུ་ཚབ་བཙུགསཔ་ཨིན།

Example

=SUBSTITUTE("123123123";"3";"abc") returns 12abc12abc12abc.

=SUBSTITUTE("123123123";"3";"abc";2) returns 12312abc123.

T

ལས་འགན་དེ་གིས་ དམིགས་གཏད་ཚིག་ཡིག་སླར་ལོག་འབད་ནི་དང་ ཡང་ན་ དམིགས་གཏད་འདི་ཚིག་ཡིག་མེན་པ་ཅིན་ཚིག་ཡིག་སྟོངམ་ཆའི་ཡིག་རྒྱུན་འབད་སླར་ལོག་འབདཝ་ཨིན།

Syntax

T(གནས་གོང་།)

value འདི་ ཚིག་ཡིག་ཡིག་རྒྱུན་དང་ཡང་ན་ ཚིག་ཡིག་ཡིག་རྒྱུན་ལུ་གཞི་བསྟུན་འབད་བ་ཅིན་ T དེ་གིས་ ཚིག་ཡིག་ཡིག་རྒྱུན་འདི་སླར་ལོག་འབདཝ་ཨིན་; འདི་མེན་པ་ཅིན་དེ་གིས་ ཚིག་ཡིག་སྟོང་ཆའི་ཡིག་རྒྱུན་ཅིག་སླར་ལོག་འབདཝ་ཨིན།

Example

=T(12345) returns an empty string.

=T("12345") returns the string 12345.

TEXT

Converts a value into text according to a given format.

Syntax

TEXT(Value; Format)

Value is the value (numerical or textual) to be converted.

རྩ་སྒྲིག་ དེ་ རྩ་སྒྲིག་ངེས་འཛིན་འབད་བའི་ཚིག་ཡིག་ཨིན། ནང་ཐིག་རྩ་སྒྲིག་ནང་ལུ་གཞི་སྒྲིག་འབད་ཡོད་པའི་སྐད་ཡིག་དང་འཁྲིལ་ཏེ་ བཅུ་ཚག་དང་དབྱེ་བྱེད་སྟོང་ཕྲག་ཚུ་ལག་ལེན་འཐབ།

Example

=TEXT(12.34567;"###.##") returns the text 12.35

=TEXT(12.34567;"000.00") returns the text 012.35

=TEXT("xyz";"=== @ ===") returns the text === xyz ===

tip

See also Number format codes: custom format codes defined by the user.


TRIM

བར་སྟོང་ཚུ་ ཡིག་རྒྱུན་ཅིག་ལས་ མིང་ཚིག་ཚུ་གི་བར་ན་ བར་སྟོང་ཡིག་འབྲུ་རྐྱང་པ་ཅིག་བཞག་ཐོག་ རྩ་བསྐྲད་གཏངམ་ཨིན།

Syntax

TRIM(ཚིག་ཡིག)

Text refers to text in which spaces are to be removed.

Example

=TRIM(" hello world ") returns hello world without leading and trailing spaces and with single space between words.

UNICHAR

Converts a code number into a Unicode character or letter.

Syntax

UNICHAR(number)

Example

=UNICHAR(169) returns the Copyright character ©.

tip

See also the UNICODE() function.


UNICODE

ཚིག་ཡིག་ ཡིག་རྒྱུན་ནང་ལུ་ ཡིག་འབྲུ་དང་པམ་དོན་ལུ་ ཨང་གྲངས་ཀྱི་ཨང་རྟགས་སླར་ལོག་འབདཝ་ཨིན།

Syntax

UNICODE("Text")

Example

=UNICODE("©") returns the Unicode number 169 for the Copyright character.

tip

See also the UNICHAR() function.


UPPER

ཚིག་ཡིག་ས་སྒོ་ནང་ལུ་གསལ་བཀོད་འབད་ཡོད་པའི་ ཡིག་རྒྱུན་དེ་ ཚུགས་ཡིག་ནང་ལུ་ གཞི་བསྒྱུར་འབདཝ་ཨིན།

Syntax

UPPER(ཚིག་ཡིག)

ཚིག་ཡིག་ དེ་ ཁྱོད་ཀྱིས་ ཚུགས་ཡིག་ལུ་གཞི་བསྒྱུར་འབད་ནི་ཨིན་པའི་མགྱོགས་ཡིག་ལུ་གཞི་བསྟུན་འབདཝ་ཨིན།

Example

=UPPER("Good Morning") returns GOOD MORNING.

བི་ཨེ་ཨེཆ་ཊི་ཚིག་ཡིག་

ཐཱའི་དངུལ་གྱི་མིང་ཚུ་གྲངས་སུ་བཙུགས་ཏེ་ ཨང་ཅིག་ཐཱའི་ཚིག་ཡིག་ལུ་གཞི་བསྒྱུར་འབདཝ་ཨིན།

Syntax

བི་ཨེ་ཨེཆ་ཊི་ཚིག་ཡིག་(ཨང་)

ཨང་ འདི་ཨང་ག་ཅི་འབད་རུང་ཨིན། "Baht" འདི་ ཨང་གི་ཧྲིལ་གྲངས་ཡན་ལག་འདི་ལུ་འཇུག་བསྣོན་འབད་ཡོད་ དེ་ལས་ "Satang" འདི་ ཨང་གི་བཅུ་ཚག་ཡན་ལག་འདི་ལུ་འཇུག་བསྣོན་འབད་ཡོད།

Example

བི་ཨེ་ཨེཆ་ཊི་ཚིག་ཡིག་(༡༢.༦༥)གིས་ "Twelve Baht and sixty five Satang" གི་དོན་དག་འབད་མི་ ཐཱའི་ཡིག་འབྲུ་ནང་ ཡིག་རྒྱུན་ཅིག་སླར་ལོག་འབདཝ་ཨིན།

Technical information

This function is not part of the Open Document Format for Office Applications (OpenDocument) Version 1.3. Part 4: Recalculated Formula (OpenFormula) Format standard. The name space is

COM.MICROSOFT.BAHTTEXT

Please support us!