ID EN
#Dynamic array

TEXTSPLIT

Excel Functions 🇮🇩 Bahasa Indonesia

Pisahkan string teks dengan pembatas

Syntax

EXCEL
=TEXTSPLIT(text, col_delimiter, [row_delimiter], [ignore_empty], [match_mode], [pad_with])

Arguments

Parameter Deskripsi
text The text string to split.
col_delimiter The character(s) to delimit columns.
row_delimiter [optional] The character(s) to delimit rows.
ignore_empty [optional] Ignore empty values. TRUE = ignore, FALSE = preserve. Default is FALSE.
match_mode [optional] Case-sensitivity. 0 = enabled, 1 = disabled. Default is 0.
pad_with [optional] Value to pad missing values in 2d arrays.

Return Value

Array nilai terpisah

Details

Fungsi TEXTSPLIT membagi string teks dengan pembatas tertentu menjadi beberapa nilai. Output dari TEXTSPLIT adalah array yang akan tersebar ke beberapa sel di buku kerja. TEXTSPLIT dapat membagi string teks menjadi kolom atau baris. Untuk menggunakan TEXTSPLIT, Anda perlu menyediakan teks yang akan dipisahkan dan pembatas. Anda dapat menyediakan pembatas kolom (col_delimiter) untuk membagi teks menjadi kolom, atau pembatas baris (row_delimiter) untuk membagi teks menjadi baris. Misalnya, rumus di bawah ini membagi teks "merah-biru-hijau" menjadi nilai-nilai terpisah dalam kolom: Perhatikan bahwa pembatas kolom diberikan sebagai tanda hubung ("-). Jika kita memindahkan tanda hubung ("-") ke posisi pembatas baris, fungsi TEXTSPLIT akan mengembalikan nilai yang sama yang dibagi menjadi beberapa baris: Perhatikan bahwa kedua rumus di atas mengembalikan tiga array

Contoh

Split text into columns or rows

TEXTSPLIT can split a text string into columns or rows. To use TEXTSPLIT, you will need to provide the text to split and a delimiter. You can either p

EXCEL
=TEXTSPLIT("red-blue-green","-") // returns {"red","blue","green"}
Split text into columns or rows

Note that the column delimiter is provided as a hyphen ("-). If we move the hyphen ("-") to the row delimiter position, the TEXTSPLIT function will re

EXCEL
=TEXTSPLIT("red-blue-green",,"-") // returns {"red";"blue";"green"}
Split text into columns or rows

The first formula in cell D3 separates the three values into separate columns:

EXCEL
=TEXTSPLIT(B3,",") // returns {"Red","Blue","Green"}
Split text into columns or rows

The formula in cell D5 uses the same delimiter to split the text into separate rows:

EXCEL
=TEXTSPLIT(B3,,",") // returns {"Red";"Blue";"Green"}
Behavior if no delimiter is found

If the provided delimiter is not found, TEXTSPLIT will return the original text unchanged. For example, if we use TEXTSPLIT on the text string "apple

EXCEL
=TEXTSPLIT("apple orange",".") // returns "apple orange"
Ignoring empty values

The formula in cell D3 does not include a value for ignore_empty, so empty values will appear:

EXCEL
=TEXTSPLIT(B3,",") // empty values will appear

See Also

TEXTJOIN TEXTBEFORE TEXTAFTER CONCAT