Please enable JavaScript to view the comments powered by Disqus.


IF(...C18="School 1",VLOOKUP(...C19,A5:C16,3,0),VLOOKUP(...C19,E5:G16,3,0))

Using VLOOKUP() function with IF() conditions

The formula works by checking if the criteria meets, thus returning the first argument of IF(), otherwise, the second argument is returned. In the first and the second argument we have VLOOKUP() formula that will return results from the respective range of values. 


Used Functions

Category: Logical

Specifies a logical test to perform

Syntax

IF(Something is True, then do something, otherwise do something else)

Category: Lookup and reference

Looks in the first column of an array and moves across the row to return the value of a cell

Syntax

VLOOKUP (lookup_value, table_array, col_index_num, [range_lookup])

Lets chat on this