ID EN
#Dynamic array

LAMBDA

Excel Functions 🇮🇩 Bahasa Indonesia

Buat fungsi khusus

Syntax

EXCEL
=LAMBDA(parameter, ..., calculation)

Arguments

Parameter Deskripsi
parameter An input value for the function.
calculation The calculation to perform as the result of the function. Must be the last argument.

Return Value

Seperti yang ditentukan oleh rumus

Details

Fungsi LAMBDA menyediakan cara untuk membuat fungsi kustom di Excel. Setelah ditentukan dan diberi nama, fungsi LAMBDA bisa digunakan di mana saja dalam buku kerja. Fungsi LAMBDA bisa sangat sederhana atau cukup kompleks, merangkai banyak fungsi Excel menjadi satu rumus. Fungsi LAMBDA khusus tidak memerlukan VBA atau makro. Contoh 1 | Contoh 2 | Contoh 3 | Contoh 4 Dalam pemrograman komputer, istilah "lambda" mengacu pada fungsi atau ekspresi anonim. Fungsi anonim adalah fungsi yang didefinisikan tanpa nama. Di Excel, fungsi LAMBDA pertama kali digunakan untuk membuat rumus umum (tanpa nama). Setelah versi generik dibuat dan diuji, versi tersebut dipindahkan ke Manajer Nama, di mana versi tersebut didefinisikan dan diberi nama secara formal. Salah satu manfaat utama fungsi LAMBDA khusus adalah logika conta

Contoh

Example 1 - basic example

To illustrate how LAMBDA works, let's begin with a very simple formula:

EXCEL
=x*y // multiply x and y
Example 1 - basic example

In Excel, this formula would typically use cell references like this:

EXCEL
=B5*C5 // with cell references
Example 1 - basic example

As you can see, the formula works fine, so we are ready to move on to creating a generic LAMBDA formula (unnamed version). The first thing to consider

EXCEL
=LAMBDA(x,y  // begin with input parameters
Example 1 - basic example

Next, we need to add the actual calculation, x*y:

EXCEL
=LAMBDA(x,y,x*y)
Example 1 - basic example

If you enter the formula at this point, you'll get a #CALC! error. This happens because the formula has no input values to work with since there are n

EXCEL
=LAMBDA(x,y,x*y)(B5,C5) // testing syntax
Example 1 - basic example

Make sure the formula begins with an equals sign (=). Now that the LAMBDA formula has a name, it can be used in the workbook like any other function.

EXCEL
=XBYY(B5,C5)

See Also

LAMBDA LET ISOMITTED MAP SCAN REDUCE MAKEARRAY BYCOL