Results 1 to 11 of 11

custom sort list order in vba

Threaded View

  1. #1
    Registered User
    Join Date
    10-17-2014
    Location
    london, england
    MS-Off Ver
    version 2010
    Posts
    5

    custom sort list order in vba

    Guys,

    I need to sort the data started at range (A9:H9) based on the data at column B9 but in a form of custom list order based on my list such as "221","143","224","9955","6565".

    i have tried the below formula and it works fine but it sorts in ascending order..

    Dim lastrow As Long
    lastrow = Cells(Rows.Count, 2).End(xlUp).Row
    Range("A9:H" & lastrow).sort Key1:=Range("B9:B" & lastrow), _
       Order1:=xlAscending, Header:=xlNo

    Please i need your help guys to show me what's the code in order to sort my data using custom list.

    Thank you..
    Last edited by Leith Ross; 10-17-2014 at 05:00 PM. Reason: Added Code Tags

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Custom sort order
    By 4lowie in forum Excel General
    Replies: 14
    Last Post: 03-09-2014, 11:08 AM
  2. [SOLVED] Custom Sort Order for Sheets
    By Comisar in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-15-2013, 02:10 PM
  3. VBA Custom Sort Order Issues
    By Warderbrad in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-22-2012, 04:38 PM
  4. Custom sort order problem
    By mfmcclellan in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-04-2012, 05:05 PM
  5. Problems with custom sort order
    By bluphoto in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-11-2008, 06:23 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