Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Custom Sort
I've just written a very simple VBA program to help keep track of my
inventory, however I've run into a problem in sorting the items once they have been entered into the inventory. I want to sort the items in the inventory by part number, beginning by the first number and then by the second digit, followed be the third, i.e. 1098, 20811, 2173, 29805, 311, 4908765 and so on, but I can't figure out how to do this and to stop it sorting like this 311, 1098, 2173, 20811, 29805, 4908765. I've tried creating a custom sort list as a macro then copying into my main program but I always seem to end up with the same result. How can I make it list by first digits, then second etc instead of by it's value. Any suggestions. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Custom Sort
If you treat the field as text, it will sort alphabetically. Add a ' in front
of each number. When you sort it will ask to sort as a number or as text. "Steve Stanley" wrote: I've just written a very simple VBA program to help keep track of my inventory, however I've run into a problem in sorting the items once they have been entered into the inventory. I want to sort the items in the inventory by part number, beginning by the first number and then by the second digit, followed be the third, i.e. 1098, 20811, 2173, 29805, 311, 4908765 and so on, but I can't figure out how to do this and to stop it sorting like this 311, 1098, 2173, 20811, 29805, 4908765. I've tried creating a custom sort list as a macro then copying into my main program but I always seem to end up with the same result. How can I make it list by first digits, then second etc instead of by it's value. Any suggestions. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
custom lists and custom formulas? | Excel Discussion (Misc queries) | |||
Using custom functions within custom validation | Excel Discussion (Misc queries) | |||
Can you link a custom property to an Excel custom header text? | Setting up and Configuration of Excel | |||
custom list does not sort | Excel Worksheet Functions | |||
Excel sort by Fill Color by custom list sort | Excel Discussion (Misc queries) |