Home » excel » excel – lookup with 2 values to transpose rows to columns

excel – lookup with 2 values to transpose rows to columns

Posted by: admin May 14, 2020 Leave a comment


I have a table that looks like this:

enter image description here

I would like to make it so that each Name has its own distinct row, with the subjects changed to column headers and the grade being the value, like below

enter image description here

I’m currently using INDEX and MATCH to look up the grades, but I have to re-write the formula every time which will be time consuming considering my actual data is a few hundred rows

Here is my formula


Is there a way to do this so I don’t have to re-write the formula for every cell?

How to&Answers:

Well, done the first for you, needed a helper column though, see:


enter image description here

Added iferror() to hide missing values.

Shown the formula for cell G2 which you can drag or use control enter to enter in all cells selected.


A non-array formula option and without helper column

Assume your “Source” table put in A1:C8

And, “Output” table put in G1:J4

In “Output” H2, formula copied across right to J2, and all copied down :


Then, select H2:J4 >> Format Cell >> click Accounting >> Decimal places, choose : 0 and Symbol, choose: None