Warning: This site requires the use of scripts, which your browser does not currently allow. See how to enable scripts.

# Sorting a range that contains numbers stored as text

**Sort numbers, and numbers stored as text, separately**

When you sort numbers stored as text, as text, numbers stored as numbers are sorted first, and then numbers stored as text. For example, after sorting in ascending order, the range would appear to have two sets of numbers. Also, numbers stored as text are evaluated character by character, left to right. For example, 11 appears before 5 because 1 is before 5 in the first character.

Data |
Data type |
---|---|

1 | Number |

10 | Number |

11 | Number stored as text |

5 | Number stored as text |

**Sort anything that looks like a number as a number**

When you sort numbers stored as text, as numbers, both numbers stored as text and numbers are sorted together. For example, after sorting in ascending order the range would appear to have one set of numbers.

Data |
Data type |
---|---|

1 | Number |

5 | Number stored as text |

10 | Number |

11 | Number stored as text |

Applies to:

Excel 2003