+ Reply to Thread
Results 1 to 3 of 3

Sorting Problem When Adding Multiple keys

  1. #1
    Registered User
    Join Date
    10-27-2013
    Location
    Odisha,India
    MS-Off Ver
    Excel 2007
    Posts
    12

    Sorting Problem When Adding Multiple keys

    I am getting "Named argument not found" error while sorting using multiple keys.
    Please Login or Register  to view this content.
    However, the code works fine when a single "Key" is defined. But gives error if "Key1" is used.

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    6,290

    Re: Sorting Problem When Adding Multiple keys

    You are mixing the range sort method from XL2003- with the worksheet sort method from XL2007+. Before, you could only use three keys, now you can add more (not sure of the limit) but you add them one by one, so try it this way:

    Please Login or Register  to view this content.
    Last edited by Bernie Deitrick; 08-21-2015 at 12:53 PM.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    10-27-2013
    Location
    Odisha,India
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Sorting Problem When Adding Multiple keys

    Thanks Bernie. That worked perfectly.

+ 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. Tidying up code: Sorting using autofilter and multiple keys
    By cejhoney in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-10-2014, 05:25 AM
  2. [SOLVED] Sorting - 4 Keys
    By Aquamore in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-26-2013, 07:44 PM
  3. Adding shortcut keys to Custom menus
    By ggayathri in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 08-17-2010, 05:38 AM
  4. Sorting by variable keys
    By jgmiddel in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-10-2008, 09:30 AM
  5. shortcut keys problem
    By g_mac in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-18-2008, 05:02 PM
  6. shortcut keys problem
    By joanief in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-14-2006, 07:57 AM
  7. sorting more than 3 keys
    By Brooke in forum Excel General
    Replies: 3
    Last Post: 06-18-2005, 12:05 AM

Tags for this Thread

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