I have some rows in Excel with formulas that simply refer to values in other rows:
=A1
=A2
=A3
The original data is something like
Smith, Snuffy
Jones, Barnaby
Doe, Bambi
I want to leave the original data alone, but sort the rows with the formulas according to the data displayed by those formulas. I want the rows with formulas to show
Doe, Bambi
Jones, Barnaby
Smith, Snuffy
and therefore have formulas
=A3
=A1
=A2
But when I sort, the formulas are still intact, showing the same data as before. I am trying different things to narrow down the problem and getting even more bizarre results. Like switching a couple of rows around, and then sorting, and then those rows get completely different formulas.
I have scoured Excel Help but Excel Help is only good for the most straightforward issues. I tried MS Knowledgebase, but the closest I came was how to set up the formulas so the data displayed will not change if you sort the original data, kind of the converse of what I want.
I just cut and pasted your exact names and used the links you listed - no problems resorting here. I just highlighted the cells with the links, sorted alphabetically and it worked like a charm (the formulas switched from A1, A2, A3 to A3, A2, A1).
Hmmm. I wonder if I have some option set that is affecting this. I know that find & replace has an option to look at values vs. formulas but I didn’t see anything like that for sorting. Back to the drawing board. Thanks for the effort!
I think changing the formulas to be fixed (with a $ before the column letter and row number) as splatterpunk described is the only way to sort the formulas without the cell-referencing adjusting to the original data.
The fastest way to change all the formulas to fixed references is to hilight the entire column and doing a replace, with “A” in the “find” parameter and “A”, then selecting “Replace All”.
Unfortunately, each time you insert a new record you will have to resort the column with the formulas, but that’s not too much work since you will have to add a forumula in the new cell to pick up the new data.