Excel workshop: finding the result in two dimension table

Excel workshop: finding the result in two dimension table

I would like to start publishing from time to time some posts on Linkedin about Excel topic. My idea is to share some interesting solutions and possibilities of this tool, maybe for someone it is something new and useful. I don't want to create manuals, rather workshops where I present the exciting concepts. My assumption is to provide the intermediate level of content but if you wish I may prepare also something on beginner level and/or advanced.

Today's assumptions: let's assume that we have a table with columns (unique Years), rows (unique Products) and values inside the table.

The table with unique Years and unique Products

Today's task: let's create a single formula which gives us the value from the table for the specific Year and product (the user of the formula just need to provide the Year and Product name).

Brak alternatywnego tekstu dla tego zdjęcia


One of the solution: you may create a formula like this: =HLOOKUP(T4;$C$3:$Q$22;MATCH(T5;$B$3:$B$22;0);0)

As you can see, first we use Hlookup function to find the year in the table:

  1. The first parameter of Hlookup (T4) it is the cell with the Year defined by the user (in our example: 2013)
  2. The second parameter of Hlookup ($C$3:$Q$22) it is the range of table. The first row of the table should be the Year.
  3. The third parameter of Hlookup (MATCH(T5;$B$3:$B$22;0)) it is the number of row from the table which we want to take for the particular Year. Because the number of the row is not constant in our case (the product name may change) we have to use Match function. Match fuction gives us the number of the row which we are looking for based on Product name.
  4. The forth parameter of Hlookup (0) means that we want to find the exact match in the table.
  5. The first parameter of Match (T5) it is Product name defiened by the user (in our case Product 4).
  6. The second parameter of Match ($B$3:$B$22) it is the range of list with Products (should start on the same row as Years).
  7. The third parameter of Match (0) means want to find the exact match in the table.
Brak alternatywnego tekstu dla tego zdjęcia

I've just described one of the potential solution - do you have any other idea how to solve it?If you have any question about Excel please write a comment or ping me on priv - I will try to help you.

To view or add a comment, sign in

Others also viewed

Explore content categories