Sort by All Colors in the column by color index

  • Hi,


    How to sort a column by it's TintAndShade property as 'Sort by A-Z'?


    'Sort by Color' of Auto Filter option shows each color individually.


    I want to order least value of TintAndShade to highest value.


    I have attached a sample file which have colors (And ONLY for your clearance TINTANDSHADE value (of the color in third column of same row)).

  • Hi,


    If I understand correctly your request ... you could use the standard sort from the Menu using :


    1. either, using Column C, Sort by ID ... Smallest to Largest


    2. or, using Column D, Sort by TintAndShade ... Smallest to Largest


    HTH

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Like" icon ...just below...in the bottom right corner...:)


  • Hi Carim,
    Sorry about my question was not clear. I added the columns ID and TINANDSHADE only for reference. Now I've mentioned it.

  • Hi again,


    No problem ...


    You could be using a UDF such as this one :


    Code
    1. Public Function TAS(c As Range)
    2. TAS = c.Interior.TintAndShade
    3. End Function


    See attached ...


    Hope this will help

    Files

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Like" icon ...just below...in the bottom right corner...:)

  • Hi Carim,


    I am glad to have your help. But I know this formula since the color in the cells itself done by subroutine.


    I just wanted to avoid a UDF to give other non excel skilled users of my data to filter without running UDF/Subroutine. They should be able to filter data by just using the Auto filter menu only.

  • Hi,


    Sorry ... but do not fully understand your constraints ...


    Would you accept an event macro ...???

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Like" icon ...just below...in the bottom right corner...:)