0

I would like to know how to implement this in an excel formula: I have a column with some names, a row with different numbers (dates), and the remaining values work as "keys". For instance:

           3    10  17  24
person1   HE            
person2         GB  HE  
person3         TY      OK

In another page I have this:

       3    10
HE     ??   ??
GB     ??   ??
TY     ??   ??

And I want to get the following:

           3            10
HE      person1         -
GB         -         person2
TY         -         person3

Thus I want to see who (which person in the first column of the first table) has each "key" (HE, GB, TY...) in each day, and write his/her name depending on the date number (3, 10...) in the last table. And there's no match, leave it empty or with a "-" in it.

Thank you!

2 Answers2

0

You can try and adapt the formula below:

=IFNA(INDEX($A$2:$A$4,MATCH($A$8:$A$10,B2:B4,0)),"-")

Drag it to fill the other cells

enter image description here

0

Try to use Power Query to get the result:

  1. Select Range- go to Data- From Range\Table: enter image description here

  2. Select Column 3, 10, 17 and 24- go to Transform- select Unpivot Columns: enter image description here

  3. Select Attribute column- Select Pivot Column- Value Column= Column1 and under Advanced options, Aggregate Value Function= Don't Aggregate- Close & Load: enter image description here

Lee
  • 3,021