Search code examples
excelexcel-tables

Excel - Create one to one relationship between tables


I have a workbook for controlling attendance of students on a course, modelled on many worksheets. The first worksheet have the cadastral data for all students. The other ones have attedence data of each month. I need to dinamically update the first column of the attendance worksheets according with students column on cadastral data worksheet.

VLOOKUP or MATCH/INDEX seems not to be a good solution because data can be added on cadastral data worksheet, and I need to always re-organize students to alphabetical order.

For example:

Cadastral Data:

Student | (many data ccolumns)

Ann | data

Charlie | data

Jack | data

February Attendence:

Student | Day 01 | Day 02 | Day 03 ...

Ann | ok ok nok

Charlie | ok ok ok

Jack | ok nok ok

If I use VLOOKUP or INDEX/MATCH and add Daniel on cadastral data and then sort alphabetically, I'll have this issue:

Cadastral Data:

Student | (many data ccolumns)

Ann | data

Charlie | data

Daniel | data

Jack | data

February Attendence:

Student | Day 01 | Day 02 | Day 03 ...

Ann | ok ok nok

Charlie | ok ok ok

Daniel | ok nok ok

Jack |

Jack Data changed to Daniel.

Is there a simple solution for this?


Solution

  • I am not too sure how you are using INDEX/MATCH... but this is how I would do it.

    I would add an ID column to each table. That way the data, whether it is Cadastral data (including the students name) or attendance data, is associated with that unique ID and you can then link the two tables using this ID.

    In this way, both tables can be sorted and filtered entirely independently of each other.

    enter image description here