+ Reply to Thread
Results 1 to 7 of 7

Cells with Conditional Formatting or Data Validation Lists not sorting properly

  1. #1
    Registered User
    Join Date
    01-07-2012
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2010
    Posts
    3

    Cells with Conditional Formatting or Data Validation Lists not sorting properly

    I'd appreciate any help you can give here. With Excel 2010 I am using Conditional Formatting to change the color of some cells (e.g. A2 & A3) in a column whenever they contain text (i.e. "No Blanks"). This works fine until I use filtering or sorting on the column - when I do, the Conditional Formatting stays with the original cells (A2 & A3), rather than moving with the correct row of data. Is it possible to have the Conditional Formatting move with the data during a sort?

    The exact same thing is happening with cells to which I have applied a Data Validation List. Is it possible to have the Data Validation move with the data during a sort?

    I suspect this has something to do with relative vs. absolute references, but don't know how to fix it. Thanks!!!

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Cells with Conditional Formatting or Data Validation Lists not sorting properly

    Hello and welcome to the forum.

    Yes you are right when you say relative and absolute references - you can play around the dollar ($) sign in references but it would be better if you can post the sample file here for forum to understand better. Thanks.


    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Registered User
    Join Date
    01-07-2012
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Cells with Conditional Formatting or Data Validation Lists not sorting properly

    Hi dilipandey! Thanks for your help and for your patience with me. I'm a newbie at posting in forums.

    I've attached an example Excel 2010 file with explanation of the problem, and an illustration of the problem before (Sheet1) and after (Sheet2) a sort is performed. Hopefully this is sufficiently clear. Thx!

    Regards,
    EmptinessEagles&Snow
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Cells with Conditional Formatting or Data Validation Lists not sorting properly

    Here is the fixed. I highlighted the range, and applied formula =F10="Paid"

  5. #5
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Cells with Conditional Formatting or Data Validation Lists not sorting properly

    Hi EmptinessEagles&Snow,


    It is happening because you have not used the cell references while providing the conditional formatting logic and this need to be provided to all the range where you may enter "Paid" in future using formula. Also use the correct option to provide CF logic i.e., "use formula to determine which cell to format".
    See the attached file where I have provided the CF logic in range F10: Q19 and done some testing as well
    You can remove the extra "Paid" which I have written for testing purpose .

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    01-07-2012
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Cells with Conditional Formatting or Data Validation Lists not sorting properly

    JieJenn & DILIPandey, thank you both for your rapid responses and very helpful suggestions!! This will clearly fix my problem. Cheers!

    Regards,
    EmptinessEagles&Snow

  7. #7
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Cells with Conditional Formatting or Data Validation Lists not sorting properly

    You are welcome EmptinessEagles&snow . . .

    Cheers

    Regards,
    DILIPandey

    <click on below star if this helps>

+ 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