+ Reply to Thread
Results 1 to 5 of 5

listbox number sorting

  1. #1
    Registered User
    Join Date
    10-15-2012
    Location
    Romania
    MS-Off Ver
    Excel 2003
    Posts
    17

    listbox number sorting

    I have a listbox. When I press "Number" header, I want to sort correctly the "Number" column.

    1,20
    107,55
    16,35
    69,60

    must be

    1,20
    16,35
    69,60
    107,55

    Can somebody help me?
    Attached Files Attached Files

  2. #2
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: listbox number sorting

    Hi dannyhar,
    try changing this line in the Private Sub UserForm_Initialize()
    Please Login or Register  to view this content.
    if it is suitable for you

  3. #3
    Registered User
    Join Date
    10-15-2012
    Location
    Romania
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: listbox number sorting

    It is disturbing to show zeros in front of numbers. Could not occur without zeros?

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,485

    Re: listbox number sorting

    Use helper columns, which can been hidden, for sorting text as numbers.
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

  5. #5
    Registered User
    Join Date
    10-15-2012
    Location
    Romania
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: listbox number sorting

    Yes! This is better.
    Thanks nilem, Thanks Andy Pope!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Sorting a listbox
    By AndyE in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-23-2013, 05:11 PM
  2. Listbox to Listbox, no duplicates & submitting same UserForm data for each Listbox entry.
    By jamieswift1977 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-18-2012, 12:18 PM
  3. sorting multi column listbox
    By ali84pk in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 11-11-2011, 02:18 PM
  4. Sorting Listbox
    By yawnzzzz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-11-2010, 12:08 AM
  5. sorting a listbox in a user form
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-05-2006, 09:50 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1