I have 2 separate file

File A

Name-------Code-------Value
aaa-------- f------------1000
bbb ---------c------------ 2000
ccc-----------c------------ 3000
ddd--------- f------------ 4000
eee---------c-------------5000

File B (Cells linked to File A)

Name Code Value
aaa f 1000 (linked to row 1 of file A)
ddd f 4000 (linked to row 4 of file B)

Each cell in FIle B is linked to File A.
I want to be able to sort File A by Code or any other field and still show the data I have in File B currently.
I have tried absolute , relative & mixed linking ...but nothing seems to work.
It almost seems like I need to apply some C,C++ style theory of pointers but i dont think excel supports that.
any IDEAS.

Thanks