Hi there,
I am trying to sort a column with both numbers and text. For example, 1, 10, 1a, 2a, 2b etc. These are address numbers and I want to sort firstly by street name and then by house number. The street name part works fine but every time I sort the street number column I get 1, 4, 6, 1a, 10a etc. Can some one please help me in sorting this so that the number 1 is always at the top regardless if it has an a or b behind it. eg; 1, 1a, 1b, 2, 4, 6, 6a, 6b etc..
Thanks in advance and any help would be greatly appreciated.
BJkiwi007
Example below. As you can see, 10a and 8a are at the bottom but I want them to be after 8 and 10 respectively.
<table border="0" cellpadding="0" cellspacing="0" width="104"><colgroup><col style="mso-width-source:userset;mso-width-alt:1901; width:39pt" span="2" width="52"> </colgroup><tbody><tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">1</td> <td class="xl66" style="width:39pt" width="52">1</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">2</td> <td class="xl66" style="width:39pt" width="52">2</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">3</td> <td class="xl66" style="width:39pt" width="52">3</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">4</td> <td class="xl66" style="width:39pt" width="52">4</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">5</td> <td class="xl66" style="width:39pt" width="52">5</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">7</td> <td class="xl66" style="width:39pt" width="52">7</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">8</td> <td class="xl66" style="width:39pt" width="52">8</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">9</td> <td class="xl66" style="width:39pt" width="52">9</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">10</td> <td class="xl66" style="width:39pt" width="52">10</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">11</td> <td class="xl66" style="width:39pt" width="52">11</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">12</td> <td class="xl66" style="width:39pt" width="52">12</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">14</td> <td class="xl66" style="width:39pt" width="52">14</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">15</td> <td class="xl66" style="width:39pt" width="52">15</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">16</td> <td class="xl66" style="width:39pt" width="52">16</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">18</td> <td class="xl66" style="width:39pt" width="52">18</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">22</td> <td class="xl66" style="width:39pt" width="52">22</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">24</td> <td class="xl66" style="width:39pt" width="52">24</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">26</td> <td class="xl66" style="width:39pt" width="52">26</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">28</td> <td class="xl66" style="width:39pt" width="52">28</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">10a</td> <td class="xl66" style="width:39pt" width="52">10a</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">8a</td> <td class="xl66" style="width:39pt" width="52">8a</td> </tr> </tbody></table>
I am trying to sort a column with both numbers and text. For example, 1, 10, 1a, 2a, 2b etc. These are address numbers and I want to sort firstly by street name and then by house number. The street name part works fine but every time I sort the street number column I get 1, 4, 6, 1a, 10a etc. Can some one please help me in sorting this so that the number 1 is always at the top regardless if it has an a or b behind it. eg; 1, 1a, 1b, 2, 4, 6, 6a, 6b etc..
Thanks in advance and any help would be greatly appreciated.
BJkiwi007
Example below. As you can see, 10a and 8a are at the bottom but I want them to be after 8 and 10 respectively.
<table border="0" cellpadding="0" cellspacing="0" width="104"><colgroup><col style="mso-width-source:userset;mso-width-alt:1901; width:39pt" span="2" width="52"> </colgroup><tbody><tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">1</td> <td class="xl66" style="width:39pt" width="52">1</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">2</td> <td class="xl66" style="width:39pt" width="52">2</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">3</td> <td class="xl66" style="width:39pt" width="52">3</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">4</td> <td class="xl66" style="width:39pt" width="52">4</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">5</td> <td class="xl66" style="width:39pt" width="52">5</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">7</td> <td class="xl66" style="width:39pt" width="52">7</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">8</td> <td class="xl66" style="width:39pt" width="52">8</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">9</td> <td class="xl66" style="width:39pt" width="52">9</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">10</td> <td class="xl66" style="width:39pt" width="52">10</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">11</td> <td class="xl66" style="width:39pt" width="52">11</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">12</td> <td class="xl66" style="width:39pt" width="52">12</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">14</td> <td class="xl66" style="width:39pt" width="52">14</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">15</td> <td class="xl66" style="width:39pt" width="52">15</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">16</td> <td class="xl66" style="width:39pt" width="52">16</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">18</td> <td class="xl66" style="width:39pt" width="52">18</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">22</td> <td class="xl66" style="width:39pt" width="52">22</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">24</td> <td class="xl66" style="width:39pt" width="52">24</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">26</td> <td class="xl66" style="width:39pt" width="52">26</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">28</td> <td class="xl66" style="width:39pt" width="52">28</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">10a</td> <td class="xl66" style="width:39pt" width="52">10a</td> </tr> <tr style="mso-height-source:userset;height:12.0pt" height="16"> <td class="xl66" style="height:12.0pt;width:39pt" height="16" width="52">8a</td> <td class="xl66" style="width:39pt" width="52">8a</td> </tr> </tbody></table>