+ Reply to Thread
Results 1 to 5 of 5

Sorting With Cell Color Problem

  1. #1
    Registered User
    Join Date
    03-21-2020
    Location
    İstanbul, Turkey
    MS-Off Ver
    2016
    Posts
    27

    Sorting With Cell Color Problem

    Hello All,

    I use this codes to sort my list from small to large. But it sort cells with filling colors.
    I want to remain stable color of cells. Only contents.
    What can I do for it?

    Thanks...

    Please Login or Register  to view this content.
    Last edited by jeffreybrown; 03-21-2020 at 09:39 AM. Reason: Please use code tags!

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,837

    Re: Sorting With Cell Color Problem

    It would be easier to help and test possible solutions if you could attach a copy of your file. Explain in detail what you want to do referring to specific cells, rows, columns and sheets using a few examples from your data (de-sensitized if necessary). Also include a manual mock-up of the expected results in another sheet.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Sorting With Cell Color Problem

    This temporarily stores the colors in offset 100 columns, sorts, then restores the original colors.

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,748

    Re: Sorting With Cell Color Problem

    What is your scheme for coloring the cells? One thing you could do without a VBA solution is to apply the colors based on absolute cell address using conditional formatting. You would need one rule for each different fill color. Sorting will not affect the "Applied To" range.
    cfsort.JPG
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  5. #5
    Registered User
    Join Date
    03-21-2020
    Location
    İstanbul, Turkey
    MS-Off Ver
    2016
    Posts
    27

    Re: Sorting With Cell Color Problem

    Quote Originally Posted by AlphaFrog View Post
    This temporarily stores the colors in offset 100 columns, sorts, then restores the original colors.

    Please Login or Register  to view this content.
    Thanks... so much.
    It works.

+ 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] sorting based on cell color
    By genc27 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-02-2018, 11:14 AM
  2. Replies: 1
    Last Post: 08-23-2017, 01:15 PM
  3. [SOLVED] Sorting a cell by color
    By Master Traveler in forum Excel General
    Replies: 4
    Last Post: 06-03-2016, 03:42 PM
  4. Excel 2007 : Sorting/Extracting by cell color
    By FTN in forum Excel General
    Replies: 9
    Last Post: 02-25-2011, 03:06 PM
  5. Sorting by Cell Color, Font Color or Cell Icon in Excel 2007
    By ExcelTip in forum Tips and Tutorials
    Replies: 0
    Last Post: 11-19-2007, 12:23 PM
  6. Excel should allow sorting and filtering based on cell color.
    By Linda in forum Excel Formulas & Functions
    Replies: 23
    Last Post: 09-06-2005, 10:05 AM
  7. Sorting by cell Color
    By t2true in forum Excel General
    Replies: 3
    Last Post: 08-12-2005, 07:05 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