if statements in excel code example
Example 1: if statement on excel
Simple If statement:
=IF(C2=”Yes”,1,2) says IF(C2 = Yes, then return a 1, otherwise return a 2)
Example 2: if function example
var hi = "hi";
if (hi == "hi") { //if the variable hi is "hi" then:
//Whatever you want to happen
} if (hi != "hi") {
//Whatever you don't want to happen
}