Forum Discussion
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 the cell. is there a way that when i resort the source cell that the linked cell follows the data, not the cell.
2 Replies
- mathetesSilver Contributor
I'd like to ask you to clarify a bit more what the relationship is between these two sheets (i.e., not just the two cells). Is one of them more like "input" and the other "output"? And so on. If you are willing to share a copy of the workbook, or a mockup (to preserve confidentiality of the real) that would be helpful as well.
- m_tarlerBronze 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)