To enter an array formula, type the formula in a cell then press and hold CTRL + SHIFT simultaneously, now press Enter once. Release all keys.
The formula bar now shows the formula with a beginning and ending curly bracket telling you that you entered the formula successfully. Don't enter the curly brackets yourself.
Explaining formula in cell B8
Step 1 - Check if lookup value is equal to values in cell range C2:I2
The IF function has three arguments, the first one must be a logical expression. If the expression evaluates to TRUE then one thing happens (argument 2) and if FALSE another thing happens (argument 3). The following lines explain the logical expression:
Step 2 - Return corresponding column number
The column number will help us identify the values we want to return from another row. TRUE - corresponding column number, FALSE - nothing "".