Results 1 to 11 of 11

How can I sort a range by cell color

Threaded View

Gunner222 How can I sort a range by... 04-09-2014, 06:55 PM
Leith Ross Re: How can I sort a range by... 04-09-2014, 07:18 PM
Gunner222 Re: How can I sort a range by... 04-09-2014, 07:41 PM
Leith Ross Re: How can I sort a range by... 04-09-2014, 08:58 PM
Leith Ross Re: How can I sort a range by... 04-09-2014, 07:49 PM
Gunner222 Re: How can I sort a range by... 04-09-2014, 09:19 PM
Leith Ross Re: How can I sort a range by... 04-10-2014, 12:04 PM
Gunner222 Re: How can I sort a range by... 04-10-2014, 06:13 PM
Leith Ross Re: How can I sort a range by... 04-10-2014, 06:53 PM
Gunner222 Re: How can I sort a range by... 04-25-2014, 08:12 PM
Leith Ross Re: How can I sort a range by... 04-10-2014, 06:34 PM
  1. #1
    Registered User
    Join Date
    04-09-2014
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    5

    How can I sort a range by cell color

    Hi All,
    I have a spreadsheet we use as a "Stock Location guide" and the critical colums are as follows, Column A = Location, Column B = Date and Column F = Material Description. The following code is what we have been using to sort the guide in order of F, B and then A :
    Sub Sort_Location()
    '
        Application.CutCopyMode = False
        Selection.Sort Key1:=Range("F2"), Order1:=xlAscending, Key2:=Range("B2") _
            , Order2:=xlAscending, Key3:=Range("A2"), Order3:=xlAscending, Header:= _
            xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
        
    End Sub
    What we want to do is swap "A" and "B" so "A" is sorted before "B" and also to change the way"A" is sorted. Certain cells in "A" are yellow and I want to be able to sort by Cell color with yellow on top.
    Any help would be greatly appreciated.
    Cheers Gunner222
    Last edited by Leith Ross; 04-09-2014 at 07:16 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. [SOLVED] Sort range by alpha and then by font color with VBA
    By ChrisXcel in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-31-2014, 10:31 AM
  2. [SOLVED] change fill color of a range of cells based on color of a cell?
    By DarMelNel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-20-2014, 04:48 PM
  3. [SOLVED] vba code to change the cell color by looking in a range that contains the color index valu
    By ckklconner in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-24-2013, 09:15 AM
  4. Replies: 12
    Last Post: 09-18-2012, 03:13 PM
  5. In Excel, how do I sort a range by text color?
    By JimXL in forum Excel General
    Replies: 4
    Last Post: 01-14-2006, 04:35 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