Punya tabel master harga dan tabel transaksi terpisah? Daripada ketik ulang harga tiap transaksi, pakai VLOOKUP atau XLOOKUP buat narik data otomatis cuma dari satu kode. Ini rumus wajib buat siapa pun yang ngelola data di lebih dari satu tabel — dan di artikel ini kita bedah dari dasar sampai jebakannya.
Got a separate master price table and a transactions table? Instead of retyping prices for every transaction, use VLOOKUP or XLOOKUP to pull data automatically from just one code. This is a must-know formula for anyone managing data across more than one table — and here we cover it from the basics to the pitfalls.
Fungsinya nyari sebuah nilai di tabel lain lalu nariknya ke tabel kamu. Kamu ketik kode produk, dan harga serta nama produknya langsung muncul sendiri — diambil dari tabel master. Nggak ada ketik ulang, nggak ada salah ketik harga.Their job is to look up a value in another table and pull it into yours. You type a product code, and its price and name appear automatically — drawn from the master table. No retyping, no mistyped prices.
Bayangin tabel transaksi 500 baris. Tanpa lookup, kamu harus cari harga tiap produk manual. Dengan lookup, cukup punya satu tabel master harga, dan semua transaksi narik dari situ. Ganti harga di master sekali, semua ikut terbarui.Picture a 500-row transactions table. Without lookup, you'd hunt each product's price by hand. With lookup, you keep one master price table and every transaction pulls from it. Change a price in the master once, and everything updates.
Bentuknya =VLOOKUP(kunci; rentang; nomor_kolom; FALSE). “kunci” itu yang dicari (misal kode produk), “rentang” tabel sumbernya, “nomor_kolom” kolom ke berapa dari rentang itu yang mau diambil, dan FALSE buat pencocokan persis.The form is =VLOOKUP(key, range, col_number, FALSE). “key” is what you search (e.g. a product code), “range” the source table, “col_number” which column of that range to pull, and FALSE for an exact match.
=XLOOKUP(kunci; kolom_cari; kolom_hasil). Lebih fleksibel: kamu nunjuk langsung kolom mana yang dicari dan kolom mana hasilnya, jadi nggak perlu ngitung nomor kolom. Dia juga bisa nyari ke kiri — sesuatu yang nggak bisa dilakuin VLOOKUP.=XLOOKUP(key, lookup_col, result_col). More flexible: you point directly at which column to search and which to return, so no column counting. It can also look to the left — something VLOOKUP can't do.
Keunggulan terbesarnya: nggak patah kalau ada kolom disisipin atau digeser. VLOOKUP yang ngandelin nomor kolom bakal salah ambil begitu susunan tabel berubah; XLOOKUP tetap benar karena nunjuk kolom langsung. Kalau Sheets kamu sudah mendukungnya, XLOOKUP biasanya pilihan lebih aman.Its biggest edge: it doesn't break when a column is inserted or moved. A VLOOKUP relying on a column number grabs the wrong data once the layout shifts; XLOOKUP stays correct because it points at the column directly. If your Sheets supports it, XLOOKUP is usually the safer pick.
Kalau kunci nggak ketemu di tabel sumber, hasilnya #N/A — wajar, tapi bikin tabel jelek dan bisa ngerusak rumus lain yang ngambil dari situ. Bungkus pakai IFERROR biar rapi: =IFERROR(VLOOKUP(...); "-"), jadi munculnya tanda strip, bukan error merah.If the key isn't found in the source table, the result is #N/A — normal, but it makes the table ugly and can break other formulas reading from it. Wrap it in IFERROR: =IFERROR(VLOOKUP(...), "-"), so you get a dash instead of a red error.
Tapi hati-hati: IFERROR nyembunyiin semua error, termasuk yang harusnya kamu sadari (misal salah ketik rumus). Pakai buat nyembunyiin “data belum ada”, bukan buat nutupin rumus yang salah.But be careful: IFERROR hides all errors, including ones you should notice (e.g. a mistyped formula). Use it to hide “data not there yet”, not to mask a broken formula.
Misal kamu punya sheet “Master” berisi kode, nama, dan harga produk. Di sheet “Transaksi”, kolom A kamu isi kode produk. Di kolom B, =VLOOKUP(A2; Master!$A:$C; 2; FALSE) narik nama produk, dan di kolom C, ganti angka 2 jadi 3 buat narik harga.Say you have a “Master” sheet with product code, name, and price. On a “Transactions” sheet, column A holds the product code. In column B, =VLOOKUP(A2, Master!$A:$C, 2, FALSE) pulls the product name, and in column C, change the 2 to 3 to pull the price.
Hasilnya: kasir cukup ngetik kode, nama dan harga muncul sendiri. Kalau harga naik, kamu edit di Master satu kali — semua transaksi baru otomatis pakai harga terbaru. Inilah kenapa lookup jadi tulang punggung hampir semua template penjualan.The result: the cashier just types a code, and the name and price appear. If a price rises, you edit the Master once — every new transaction uses the latest price automatically. This is why lookup is the backbone of nearly every sales template.
Lookup makin kuat digabung rumus lain. Beberapa kombinasi yang sering kepake:Lookup gets stronger combined with other formulas. A few common combos:
Tips: Kalau VLOOKUP kamu salah ambil data, 90% karena lupa FALSE di akhir (jadi dia nyocokin kira-kira) atau nomor kolomnya kehitung salah. Cek dua itu dulu sebelum ngutak-ngatik yang lain.Tip: If your VLOOKUP grabs the wrong data, 90% of the time it's a missing FALSE at the end (so it approximates) or a miscounted column number. Check those two before fiddling with anything else.
Beberapa jebakan klasik: (1) Format kunci harus sama — kode “001” sebagai teks nggak akan ketemu kalau di master disimpan sebagai angka 1. (2) Kolom kunci VLOOKUP harus paling kiri — kalau harga ada di kiri kode, VLOOKUP nggak bisa, pakai XLOOKUP. (3) Spasi tersembunyi di kode sering bikin nggak ketemu; rapihin dulu pakai TRIM.A few classic traps: (1) Key format must match — a code “001” as text won't match if the master stores it as the number 1. (2) VLOOKUP's key column must be leftmost — if price sits left of the code, VLOOKUP can't; use XLOOKUP. (3) Hidden spaces in a code often cause no-match; clean them first with TRIM.
Pakai VLOOKUP untuk kasus sederhana dan kompatibilitas maksimal (file lama, tim yang sudah terbiasa). Pakai XLOOKUP kalau datanya sering berubah susunan kolomnya, kamu perlu nyari ke kiri, atau pengen rumus yang lebih tahan error. Keduanya sama-sama narik data — bedanya di kelenturan dan keawetan.Use VLOOKUP for simple cases and maximum compatibility (older files, a team already used to it). Use XLOOKUP when columns often get rearranged, you need to look leftward, or you want a more error-resistant formula. Both pull data — the difference is flexibility and durability.
Ringkasan cepat:Quick summary:
| RumusFormula | FungsiFunction | ContohExample |
|---|---|---|
| VLOOKUPVLOOKUP | Nyari ke kananLook right | =VLOOKUP(A2;$F:$H;3;FALSE)=VLOOKUP(A2,$F:$H,3,FALSE) |
| XLOOKUPXLOOKUP | Fleksibel 2 arahFlexible, both ways | =XLOOKUP(A2;F:F;H:H)=XLOOKUP(A2,F:F,H:H) |
| + IFERROR+ IFERROR | Sembunyikan #N/AHide #N/A | =IFERROR(VLOOKUP(...);"-")=IFERROR(VLOOKUP(...),"-") |
| + ARRAYFORMULA+ ARRAYFORMULA | Sekolom sekaligusWhole column | =ARRAYFORMULA(XLOOKUP(A2:A;F:F;H:H))=ARRAYFORMULA(XLOOKUP(A2:A,F:F,H:H)) |
| + TRIM+ TRIM | Bersihin spasi kunciClean key spaces | =VLOOKUP(TRIM(A2);...)=VLOOKUP(TRIM(A2),...) |
Mulai dari VLOOKUP buat paham konsepnya, lalu naik ke XLOOKUP. Begitu kebiasa, kamu nggak bakal ketik ulang data lagi selamanya — satu kode, semua kebawa.Start with VLOOKUP to grasp the concept, then move up to XLOOKUP. Once it clicks, you'll never retype data again — one code, everything follows.
Rakitdata punya puluhan template Google Sheets siap pakai — rumus, dashboard, dan rekapnya udah jalan dari awal.Rakitdata has dozens of ready-to-use Google Sheets templates — formulas, dashboards, and recaps already running from the start.