Pivot table into cross reference table
I have a list of students who are assigned into groups 4 different groups for 3 weeks or more. Here is the table.
| student | week 1 | week 2 | week 3 |
|---|---|---|---|
| A | 1 | 4 | 2 |
| B | 2 | 2 | 1 |
| C | 3 | 4 | 4 |
| D | 4 | 3 | 3 |
| E | 1 | 1 | 2 |
| F | 2 | 2 | 1 |
| G | 3 | 1 | 4 |
| H | 4 | 3 | 3 |
| I | 1 | 1 | 2 |
| J | 2 | 2 | 1 |
I want to pivot that table and see how many times a student worked with another student in a group. For example, student A worked with student J twice and student B worked with student F three times, whereas B and C never worked together.
How can I generate a pivot table in excel like the one below? The values in the table below show many times a student has been in the same group with another student.
| FIELD1 | A | B | C | D | E | F | G | H | I | J |
|---|---|---|---|---|---|---|---|---|---|---|
| A | - | 2 | 2 | 2 | ||||||
| B | - | - | 3 | 3 | ||||||
| C | - | - | - | 2 | ||||||
| D | - | - | - | - | 2 | |||||
| E | - | - | - | - | - | 2 | ||||
| F | - | - | - | - | - | - | 3 | |||
| G | - | - | - | - | - | - | - | |||
| H | - | - | - | - | - | - | - | - | ||
| I | - | - | - | - | - | - | - | - | - | |
| J | - | - | - | - | - | - | - | - | - | - |
from Recent Questions - Stack Overflow https://ift.tt/3kz49uf
https://ift.tt/eA8V8J
Comments
Post a Comment