Discussion
In MS Excel, what does the IF function do?
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.
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development