ID EN
#Text

LEN

Excel Functions 🇮🇩 Bahasa Indonesia

Dapatkan panjang teks.

Syntax

EXCEL
=LEN(text)

Arguments

Parameter Deskripsi
text The text for which to calculate length.

Return Value

Jumlah karakter

Details

Fungsi LEN mengembalikan jumlah karakter dalam string teks tertentu. LEN hanya membutuhkan satu argumen, teks. LEN menghitung jumlah karakter dalam teks, termasuk spasi dan tanda baca, dan mengembalikan angka sebagai hasilnya. Jika teks adalah string kosong ("") atau teks adalah referensi ke sel kosong, LEN mengembalikan nol. LEN juga akan menghitung karakter dalam angka, namun format angka tidak disertakan. LEN mengembalikan jumlah karakter dalam string teks: Karakter spasi disertakan dalam hitungan: LEN juga berfungsi dengan nilai numerik, namun format angka tidak disertakan: Fungsi LEN sering muncul dalam rumus lain yang memanipulasi teks dengan cara tertentu. Misalnya, dapat digunakan dengan fungsi RIGHT dan FIND untuk mengekstrak teks di sebelah kanan karakter tertentu:

Contoh

Examples

LEN returns the count of characters in a text string:

EXCEL
=LEN("apple") // returns 5
Examples

Space characters are included in the count:

EXCEL
=LEN("apple ") // returns 6
Examples

LEN also works with numeric values, but number formatting is not included:

EXCEL
=LEN(1000) // returns 4
=LEN($1,000) // returns 4
Examples

The LEN function often appears in other formulas that manipulate text in some way. For example, it can be used with the RIGHT and FIND functions to ex

EXCEL
=RIGHT(A1,LEN(A1)-FIND(char,A1)) // get text to right of char
Technical Notes

For some characters, the LEN function returns the number of UTF-16 code units used to encode the string rather than the number of user-perceived chara

EXCEL
=LEN("🙂") // returns 2
Technical Notes

Characters in the Basic Multilingual Plane (U+0000 to U+FFFF), like basic letters (A-Z) and symbols like π (U+03C0) and ✓ (U+2713), are encoded with o

EXCEL
=LEN("π") // returns 1

See Also

RIGHT LEFT MID