View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default cell referencing problems when sorting data

am,

The reference to the cell should move: if your formula

='Employee db - Master'!H2

was in a cell on row 3, and everything is moved to row 5, then the same formula should appear in row
5.

If, however, you expect that formula to stay on Row 3, then just do not select the column with the
formulas prior to your sorting.


HTH,
Bernie
MS Excel MVP


"am" wrote in message
...
Hi,
When I perform a data sort on a worksheet two of my columns don't sort with
the rest of the data.
For example a sort by first name changed to a sort by surname means these
two columns of cells still reference the original cell
='Employee db - Master'!H2 should change to ='Employee db - Master'!H43
after the sort but it doesn't, it stays the same and references the wrong
data.
I've tried $H$2 that doesn't work

How can I keep the cell pointing to the correct data in through a sort?

Many thanks


However, if I cut and paste cell B2 in sheet2, then sheet1 A1 follows
sheet2B2 anywhere I put it.

How can I keep cell A1 pointing to the data in B2 through a sort?