+ Reply to Thread
Results 1 to 5 of 5

Sorting with color

  1. #1
    Registered User
    Join Date
    05-20-2009
    Location
    Atlanta, GA
    MS-Off Ver
    Office 365
    Posts
    60

    Sorting with color

    Hello again gang!

    Today's question is a bit different than any of the usual ones.

    Is there a way to sort data by it's fill color? There is a really large worksheet, and I need to pull data for items that someone has highlighted in pink.

    I was hoping that I might be able to sort a couple columns by their fill color, so all the things I need to look up return all grouped together.

    Is this possible?

    Thank you, as always,

    -Keith

  2. #2
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: Sorting with color

    I remember doin smth like this in 2007. U'r able too if u use it also.
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, ?Born in USSR?
    Vusal M Dadashev

    Baku, Azerbaijan

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Sorting with color

    You can use a function to retrieve the color index, and then sort by that:
    Please Login or Register  to view this content.
    =CI(A1)
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    05-20-2009
    Location
    Atlanta, GA
    MS-Off Ver
    Office 365
    Posts
    60

    Re: Sorting with color

    ContaminatedWitExcel:
    I use 03 at work.

    shg:
    Is this a macro? I am somewhat clever with formulas, but I'm clueless with macros. How to use this? Sorry for the bother, but it would be a great help if I could get this to work.

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Sorting with color

    It is a User defined function which will be used in your workbook just like any other function once you have pasted the code into a VBA module.

    1. Open the VBA Editor (ALT + F11)
    2. Menu Insert > Module
    3. Paste code

    Then return to your worksheet and in an empty column adjacent to your data you want to sort,
    Please Login or Register  to view this content.
    Then fill down and sort by that column. Does that work for you?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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