ID EN
#Lookup and reference

COLUMNS

Excel Functions 🇮🇩 Bahasa Indonesia

Dapatkan jumlah kolom dalam array atau referensi.

Syntax

EXCEL
=COLUMNS(array)

Arguments

Parameter Deskripsi
array A reference to a range of cells.

Return Value

Jumlah kolom

Details

Fungsi COLUMNS mengembalikan jumlah kolom dalam referensi tertentu sebagai angka. Misalnya, COLUMNS(A1:C3) mengembalikan 3, karena rentang A1:C3 berisi 3 kolom. COLUMNS hanya membutuhkan satu argumen, yang disebut array, yang harus berupa rentang atau array. Gunakan fungsi COLUMNS untuk mendapatkan jumlah kolom untuk referensi atau rentang tertentu. Misalnya, terdapat 6 kolom dalam rentang A1:F1 sehingga rumus di bawah ini menghasilkan 6: Rentang A1:Z100 berisi 26 kolom, sehingga rumus di bawah ini menghasilkan 100: Anda juga dapat menggunakan fungsi COLUMNS untuk mendapatkan jumlah kolom untuk konstanta array: Meskipun tidak ada fungsi bawaan untuk menghitung jumlah sel dalam suatu rentang, Anda dapat menggunakan fungsi COLUMNS bersama dengan fungsi ROWS seperti ini:

Contoh

Examples

Use the COLUMNS function to get the column count for a given reference or range. For example, there are 6 columns in the range A1:F1 so the formula be

EXCEL
=COLUMNS(A1:F1) // returns 6
Examples

The range A1:Z100 contains 26 columns, so the formula below returns 100:

EXCEL
=COLUMNS(A1:Z100) // returns 26
Examples

You can also use the COLUMNS function to get a column count for an array constant:

EXCEL
=COLUMNS({1,2,3,4,5}) // returns 5
Examples

Although there is no built-in function to count the number of cells in a range, you can use the COLUMNS function together with the ROWS function like

EXCEL
=COLUMNS(range)*ROWS(range) // total cells
=COLUMNS(A1:Z100)*ROWS(A1:Z100) // returns 2600

See Also

ROWS ROW COLUMN