Excel: Errors Sorting Cells That Contain ReferencesLast reviewed: March 6, 1996Article ID: Q40401 |
The information in this article applies to:
SYMPTOMSIn Microsoft Excel, when you sort a column of values that are the result of arithmetic operations based on relative references, you may receive #REF error values.
CAUSETo correctly sort a range that includes cells with references, all references must be absolute references. Using relative references can result in errors because the references may become invalid when the cells are rearranged in the specified sort order. For example, given these cell and sorting A1:C3 in ascending order with the sort key being cell A1
A1: 3 B1: =A3 C1: =$A$3 A2: 2 B2: =A2 C2: =$A$2 A3: 1 B3: =A1 C3: =$A$1the resulting formulas will be:
A1: 1 B1: =#REF! C1: =$A$1 A2: 2 B2: =A2 C2: =$A$2 A3: 3 B3: =A5 C3: =$A$3Note that cell B1 is now an invalid reference and that cell B3 has lost its reference to A3 and now refers to A5. The formulas in column C have been correctly sorted. For more information, For additional information, please see the following article(s) in the Microsoft Knowledge Base:
ARTICLE-ID: Q70096 TITLE : Using FORMULA.CONVERT() to Change Relative/Absolute References ARTICLE-ID: Q48254 TITLE : Data Sort Not Sorting Correctly in Excel |
KBCategory: kbother
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |