+ Reply to Thread
Results 1 to 2 of 2

Sort multiple columns

  1. #1
    Registered User
    Join Date
    05-06-2015
    Location
    virginia, USA
    MS-Off Ver
    2013
    Posts
    37

    Sort multiple columns

    Hi All,

    I am trying to write a macro to sort on two separate columns based on the header in the column. I've tried a few different things and keep getting error 1004 method range of object _global failed. I assume it has something to do with the way I'm setting range variables but cant seem to figure it out. If someone could show me the right syntax for setting two range variables; one for the column with header "FY" and the other for the column with header "Location" that would be much appreciated. I am then trying to sort ascending first on FY and second on Installation.

    Thank you for your help.
    Last edited by sokeefe14; 05-19-2015 at 11:05 AM.

  2. #2
    Registered User
    Join Date
    05-06-2015
    Location
    virginia, USA
    MS-Off Ver
    2013
    Posts
    37

    Re: Sort multiple columns

    Little extra Info. The below code works if I refer to the cells that the headers are in by their location. However, my spreadsheet doesn't always look the same so I am trying to find those columns by name.

    Please Login or Register  to view this content.
    When I try and put my range names instead of "A1" and "F1" it gives me the error.

+ 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. [SOLVED] Sort by multiple columns with sort criteria cell dependent
    By BRISBANEBOB in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-24-2014, 02:22 AM
  2. Excel 2007 : Sort with Multiple Columns
    By Kailis in forum Excel General
    Replies: 0
    Last Post: 08-03-2011, 04:48 PM
  3. Sort Data over Multiple Columns
    By jj72uk in forum Excel General
    Replies: 7
    Last Post: 11-06-2009, 08:52 AM
  4. Sort multiple columns with multiple formulas without returning #R
    By bellsjrb in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-14-2006, 05:05 AM
  5. [SOLVED] Sort multiple columns with multiple formulas without returning #R
    By bellsjrb in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-14-2006, 05:00 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