Cellgrids Cellgrids
Home › Practice questions › IFS › Question 5

Excel IFS Practice Question: Write the department name from the code start: HR is Human Resources, FIN is…

By Rinkesh Shah, founder of Cellgrids.

The question

Write the department name from the code start: HR is Human Resources, FIN is Finance, ENG is Engineering, anything else is Other. Put it in B2 to B5.

The data

AB
1CodeDepartment
2HR-1?
3FIN-2?
4ENG-3?
5OPS-4?

The yellow cells are where your answer goes.

Show answer

Expected results:

  • B2 = Human Resources
  • B3 = Finance
  • B4 = Engineering
  • B5 = Other

How it works

Explanation: Each condition looks at the start of the code with LEFT. TRUE at the end catches all the other codes.
Syntax: =IFS(LEFT(A2,2)="HR","Human Resources",LEFT(A2,3)="FIN","Finance",LEFT(A2,3)="ENG","Engineering",TRUE,"Other")
HR-1 gives Human Resources. FIN-2 gives Finance. ENG-3 gives Engineering. OPS-4 matches none, so Other.

Try it yourself in the live sheet

Type your formula in the highlighted cell and get instant feedback. Free, no Excel install needed.

Try this question in the live sheet →

IFS syntax

=IFS(logical_test1, value1, [logical_test2, value2], ...)

Checks multiple conditions in order and returns the value for the first one that's true. IFS is used to build decision rules directly into a spreadsheet instead of manually judging each row. Full IFS guide.

More IFS practice questions

All practice questions · Excel exercises · Interview prep · Cheat sheet