Fungsi "CELL"

Keterangan

CELL disini bukanlah bagian dari kolom ataupun row, namun CELL disini adalah sebuah rumus Fungsi. Fungsi CELL mengembalikan informasi tentang format, lokasi, atau isi dari sel. Sebagai contoh, jika Anda ingin memastikan bahwa sebuah sel mengandung nilai numerik, bukan teks sebelum Anda melakukan perhitungan, Anda dapat menggunakan rumus berikut:

=IF(CELL("type", A1) = "v", A1 * 2, 0)

Syntax

CELL(info_type, [reference])


Rumus ini menghitung A1 * 2 hanya jika sel A1 berisi nilai numerik, dan mengembalikan 0 jika A1 berisi teks atau kosong.

Sintaks fungsi CELL memiliki argumen berikut:

info_type Diperlukan. Sebuah nilai teks yang menentukan jenis informasi sel Anda ingin kembali. Daftar berikut menunjukkan nilai yang mungkin dari argumen info_type dan hasil yang sesuai.

info_type Returns
"address" Referensi sel pertama dalam referensi, sebagai teks.
"col" nomor Kolom sel dalam referensi..
"color" Nilai 1 jika sel diformat dalam warna untuk nilai negatif, jika tidak maka akan dikembalikan ke 0 (nol).
"contents" Nilai sel kiri atas dalam referensi, bukan formula.
"filename" Filename (termasuk full path) dari file yang berisi referensi, sebagai teks. Pengembalian teks kosong ("") jika lembar kerja yang berisi referensi belum disimpan.
"format" Value yang bernilai Teks yang sesuai untuk format nomor. Nilai teks untuk berbagai format ditunjukkan dalam tabel berikut. Mengembalikan ke bentuk "-" pada akhir dari nilai teks jika sel diformat dalam warna untuk nilai negatif. Mengembalikan ke "()" pada akhir dari nilai teks jika sel diformat dengan tanda kurung untuk nilai positif.
"parentheses" nilai 1 jika sel diformat dengan tanda kurung untuk nilai positif atau semua, jika tidak kembali ke 0.
"prefix" Teks yang sesuai dengan "label prefix" dari sel nilai. Mengembalikan tanda kutip tunggal (') jika sel berisi /berformat left-aligned text, tanda kutip ganda (") jika sel berisi teks yang berformat rata kanan ( right-aligned text), tanda sisipan (^) jika sel berisi teks rata tengah ( centered text), backslash (\) jika sel berisi fill-aligned text, dan teks kosong ("") jika sel berisi apa pun.
"protect" The value 0 if the cell is not locked; otherwise returns 1 if the cell is locked.
"row" Row number of the cell in reference.
"type" Text value corresponding to the type of data in the cell. Returns "b" for blank if the cell is empty, "l" for label if the cell contains a text constant, and "v" for value if the cell contains anything else.
"width" Column width of the cell, rounded off to an integer. Each unit of column width is equal to the width of one character in the default font size.


CELL format codes

The following list describes the text values that the CELL function returns when the info_type argument is "format" and the reference argument is a cell that is formatted with a built-in number format.

If the Excel format is The CELL function returns
General "G"
0 "F0"
#,##0 ",0"
0.00 "F2"
#,##0.00 ",2"
$#,##0_);($#,##0) "C0"
$#,##0_);[Red]($#,##0) "C0-"
$#,##0.00_);($#,##0.00) "C2"
$#,##0.00_);[Red]($#,##0.00) "C2-"
0% "P0"
0.00% "P2"
0.00E+00 "S2"
# ?/? or # ??/?? "G"
m/d/yy or m/d/yy h:mm or mm/dd/yy "D4"
d-mmm-yy or dd-mmm-yy "D1"
d-mmm or dd-mmm "D2"
mmm-yy "D3"
mm/dd "D5"
h:mm AM/PM "D7"
h:mm:ss AM/PM "D6"
h:mm "D9"
h:mm:ss "D8"

Note If the info_type argument in the CELL function is "format" and you later apply a different format to the referenced cell, you must recalculate the worksheet to update the results of the CELL function.

Tags:

About author

Curabitur at est vel odio aliquam fermentum in vel tortor. Aliquam eget laoreet metus. Quisque auctor dolor fermentum nisi imperdiet vel placerat purus convallis.