Forum Discussion
MattG1515
Nov 13, 2024Copper Contributor
Linking cells and sorting.
Im having an issue where i have a cell on one sheet linked to a cell on another sheet. when i sort the data on the sheet the other cell is linked to, it doesn't follow the data, it stays linked to th...
m_tarler
Nov 13, 2024Bronze Contributor
I think what you want is to use a lookup function instead. So lets assume your Table (defined as tbl_Data) that might get sorted has the following columns:
ID#, first name, last name, income
so you link a formula to cell D10, which is the income for Dave Smith (ID#009) but when you sort the list (by income or last name or what not) that value moves so instead use:
XLOOKUP( "ID#009", tbl_Data[ID#], tbl_Data[income] )
or you could use
VLOOKUP( "ID#009", tbl_Data, 4, 0)