The information in this article applies to:
SUMMARYMicrosoft Excel cannot sort information based on a portion of a cell's contents; however, if the information in the cell is text, you can use text functions to extract the desired sorting criteria to an adjacent column, then sort the adjacent column. MORE INFORMATION
For example, consider the following cells:
To sort by only the last four digits of the cells, use the following formula in column B to extract only those last characters
where "cell-to-left" refers to A1, A2, A3, and A4. This formula produces the following:
Select both columns of data, and sort with B1 as the first sort key. (In version 5.0, it is not necessary to select both columns of data.) Column A is now sorted by the last four digits. The following results:
Middle digits can be found using the MID() function. For example, to sort by the third set of numbers in the above data, use the following formula, which extracts four characters beginning with the ninth digit:
REFERENCES
"Function Reference," version 4.0, pages 274 and 363-364
Additional query words: 1.5 2.0 2.00 2.01 2.1 2.10 2.20 2.21 3.0 5.0
Keywords : |
Last Reviewed: March 21, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |