Excel – How to reference a row value in a table in excel 2007 from another row such that sorting table doesn’t change it

microsoft-excel-2007

Consider a table of employee name, age and employee manager. Employee manager is a reference to employee name in same table but different row. I tried this by referencing cell =A3

Initial table

Now if I sort this table by Age, the employee manager column gets messed up and doesn't point to original intended manager. Instead it points to what's relative to old row.

Table after sort

So how to reference a row value (manager) in a table in excel 2007 from another row (employee) such that sorting(by age) table doesn't change it?

Best Answer

The simplest way is to create a copy of the Employee Name column outside the table range. It can be sorted or not, doesn't matter. It can be on the same sheet, a different sheet, or even a different workbook, just not part of the table.

Then in the Manager column put formulas refering to this new range using $E$1 format (assuming the copy is in column E)