ID EN
#Lookup and reference

MATCH

Excel Functions 🇮🇩 Bahasa Indonesia

Dapatkan posisi item dalam array

Syntax

EXCEL
=MATCH(lookup_value, lookup_array, [match_type])

Arguments

Parameter Deskripsi
lookup_value The value to match in lookup_array.
lookup_array A range of cells or an array reference.
match_type [optional] 1 = exact or next smallest (default), 0 = exact match, -1 = exact or next largest.

Return Value

Angka yang mewakili posisi di lookup_array.

Details

Fungsi MATCH digunakan untuk menentukan posisi suatu nilai dalam suatu range atau array. Misalnya pada tangkapan layar di atas, rumus di sel E6 dikonfigurasi untuk mendapatkan posisi nilai di sel D6. Fungsi MATCH mengembalikan 5 karena nilai pencarian ("peach") berada di posisi ke-5 dalam rentang B6:B14: Fungsi MATCH dapat melakukan pencocokan tepat dan perkiraan serta mendukung wildcard (* ?) untuk pencocokan sebagian. Ada 3 mode pencocokan terpisah (ditetapkan oleh argumen match_type), seperti dijelaskan di bawah. Catatan: fungsi MATCH akan selalu mengembalikan kecocokan pertama. Jika Anda perlu mengembalikan kecocokan terakhir (pencarian terbalik) lihat fungsi XMATCH. Jika Anda ingin mengembalikan semua kecocokan, lihat fungsi FILTER. MATCH hanya mendukung array atau rentang satu dimensi, baik vertikal maupun horizontal. Bagaimana

Contoh

Example 1

The MATCH function is used to determine the position of a value in a range or array. For example, in the screenshot above, the formula in cell E6 is c

EXCEL
=MATCH(D6,B6:B14,0) // returns 5
Exact match

When match_type is zero (0), MATCH performs an exact match only. In the example below, the formula in E3 is:

EXCEL
=MATCH(E2,B3:B11,0) // returns 4
Exact match

In the formula above, the lookup value comes from cell E2. If the lookup value is hardcoded into the formula, it must be enclosed in double quotes (""

EXCEL
=MATCH("Mars",B3:B11,0)
Approximate match

When match_type is set to 1, MATCH will perform an approximate match on values sorted A-Z, finding the largest value less than or equal to the lookup

EXCEL
=MATCH(E2,B3:B11,1) // returns 5
Wildcard match

When match_type is set to zero (0), MATCH can use wildcards. In the example shown below, the formula in E3 is:

EXCEL
=MATCH(E2,B3:B11,0) // returns 6
Wildcard match

This is equivalent to:

EXCEL
=MATCH("pq*",B3:B11,0)

See Also

INDEX VLOOKUP LOOKUP HLOOKUP XMATCH XLOOKUP FILTER