Machine-translated by Google. Questions are authored in English.
Top

Discussion

In MS Excel, what does the IF function do?

  • A.Returns one value when a condition is true and another when it is false
  • B.Checks whether a cell is empty
  • C.Counts the cells meeting a condition
  • D.Hides rows that do not meet a condition

Answer: A

Correct answer: Returns one value when a condition is true and another when it is false

IF tests a condition and returns one value if it is true and another if it is false: =IF(A1>=40,"Pass","Fail"). Its three arguments are the test, the value if true, and the value if false. Omitting the third returns FALSE rather than a blank, so it is usually supplied even when the answer is an empty string. IF functions can be nested to handle several cases - grades, slabs, bands - but nesting quickly becomes unreadable. IFS, in newer versions, takes a list of condition-and-result pairs and is clearer, and a VLOOKUP against a small band table is often better still. The logical functions that combine with it are worth knowing: AND requires every condition, OR requires any, and NOT reverses one. So =IF(AND(A1>=40,B1>=40),"Pass","Fail") requires both marks. IFERROR is the specialised form that catches errors.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.