+ Reply to Thread
Results 1 to 6 of 6

Sorting billions from millions

  1. #1
    Registered User
    Join Date
    04-08-2009
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    85

    Sorting billions from millions

    I've got a list of numbers where the B's and M's represent millions and billions -
    would someone be able to tell me how to sort them properly in Excel please?

    sample:

    $10.7B
    $10.82B
    $10.84B
    $10.87M
    $10.89B
    $10.8B
    $10.94B
    $10.96M

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,974

    Re: Sorting billions from millions

    Because they are not real numbers, but text, excel will sort them as text (which Im sure you have found).

    Try extracting the last digit to a helper column, then sort based on that
    =right(a1,1)
    copied down
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Sorting billions from millions

    Replace M with e5 and B with e6 to covert them to numbers. Then sort.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Registered User
    Join Date
    04-08-2009
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    85

    Re: Sorting billions from millions

    Thanks for that FD! Now I have a new problem, Excel is not sorting based on the
    decimal point - should I be removing the '$' symbol somehow perhaps?

    sample:

    $925.73M
    $93.23M
    $939M
    $94.31M
    $941.72M

  5. #5
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2021
    Posts
    6,024

    Re: Sorting billions from millions

    Or formula for helper column:

    =LEFT(A1,LEN(A1)-1)*LOOKUP(RIGHT(A1,1),{"B","M"},{1000000000,1000000})

  6. #6
    Registered User
    Join Date
    04-08-2009
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    85

    Re: Sorting billions from millions

    Thanks guys, but I think Marvin had the quickest solution so far - only replace M with E6 and B with E9

+ 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. Number Format For thousand,million and billions conditionally in excel.
    By Anshul_Jain in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-13-2016, 08:43 AM
  2. Thousands as K, Millions as M, Billions as B
    By TestMailinator in forum Excel General
    Replies: 9
    Last Post: 01-29-2015, 03:59 PM
  3. Converting to Millions
    By sathishkm in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-07-2014, 05:27 PM
  4. Excel 2007 : Number format for millions and billions
    By bruiser in forum Excel General
    Replies: 1
    Last Post: 06-14-2011, 02:49 AM
  5. Numbers in millions
    By Ondin in forum Excel General
    Replies: 1
    Last Post: 07-02-2010, 11:10 AM
  6. Trying to make millions :)
    By h20boy in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 09-30-2007, 11:25 PM
  7. Show Dollars in Millions
    By morrowjr in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM

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