Inside the VLOOKUP function, the column index argument is normally hard-coded as a static number. However, you can also create a dynamic column index by using the MATCH function to locate the right column. This technique allows you to create a dynamic two-way lookup, matching on both rows and columns. It can also make a VLOOKUP formula more resilient: VLOOKUP can break when columns are inserted or removed from a table, but a formula with VLOOKUP + MATCH can continue to work correctly even changes are made to columns.
Generic formula
=VLOOKUP(lookup_value,table,MATCH(col_name,col_headers,0),0)
Example:
In the example, we are using this formula to dynamically lookup both rows and columns with VLOOKUP:
=VLOOKUP(H2,B3:E11,MATCH(H3,B2:E2,0),0)