ID EN
#Logical

OR

Excel Functions 🇮🇩 Bahasa Indonesia

Uji beberapa kondisi secara bersamaan

Syntax

EXCEL
=OR(logical1, [logical2], ...)

Arguments

Parameter Deskripsi
logical1 The first condition or logical value to evaluate.
logical2 [optional] The second condition or logical value to evaluate.

Return Value

BENAR atau SALAH

Details

Fungsi OR adalah salah satu fungsi logis Excel. Ini dirancang untuk menguji beberapa kondisi secara bersamaan dan mengembalikan TRUE jika ada kondisi yang TRUE. Jika semua kondisi adalah FALSE, fungsi OR akan mengembalikan FALSE. Fungsi OR sering kali digabungkan dengan fungsi lain seperti AND, NOT, dan IF untuk membuat pengujian logika yang lebih kompleks. Biasanya muncul dalam pengujian logika fungsi IF dan dalam rumus untuk pemformatan bersyarat dan validasi data. Fungsi OR adalah cara yang baik untuk menyederhanakan rumus rumit dengan menggunakan banyak IF bertingkat. Tujuan dari fungsi OR adalah untuk mengevaluasi lebih dari satu pengujian logika secara bersamaan dan mengembalikan TRUE jika ada hasil yang TRUE. Fungsi OR Excel dapat menangani hingga 255 kondisi terpisah, yang dimasukkan sebagai argumen dengan nama seperti "logis1", "logis2",

Contoh

OR function basics

The purpose of the OR function is to evaluate more than one logical test at the same time and return TRUE if any result is TRUE. Excel's OR function c

EXCEL
=OR(FALSE,FALSE,TRUE) // returns TRUE
OR function basics

If all conditions are FALSE, OR will return FALSE:

EXCEL
=OR(FALSE,FALSE,FALSE) // returns FALSE
OR function basics

Typically, logical arguments are provided to OR as logical expressions, for example:

EXCEL
=OR(A1>0,A1<5)
=OR(A1>0,B1>0)
=OR(A1="red",B1="small")
OR function basics

All expressions in the formulas above will be evaluated as TRUE or FALSE. Notice that text values used in comparisons must be enclosed in double quote

EXCEL
=OR(0,0,3) // returns TRUE
=OR(0,0,0) // returns FALSE
Example - value is x or y or z

You can use OR to test for one of several values. For example, in the worksheet below, we are using the OR function to test if the codes in column B a

EXCEL
=OR(B5=115,B5=120,B5=125)
Example - OR with the IF function

The OR function is often embedded inside the IF function as the logical test to simplify what would otherwise be a more complex formula. For example,

EXCEL
=IF(OR(B5<750,C5<750),"Deny","Approve")

See Also

AND IF XOR NOT