+ Reply to Thread
Results 1 to 3 of 3

Conditional Formatting and Column Sorting

  1. #1
    Registered User
    Join Date
    09-05-2016
    Location
    Buckinghamshire, England
    MS-Off Ver
    2010
    Posts
    1

    Conditional Formatting and Column Sorting

    Afternoon everyone,

    I am looking for some help with conditional formatting and Column Sorting, I am a very basic excel user so not even sure if the combination of rules I need is possible.

    A google search on how to set conditional formatting didn't have the desired result after copying the code exactly just ended up in the whole column being highlighted.

    Each row in my spreadsheet is data from a different report from the same system (not excel so entered manually) and each column is a different piece of info relating to that report. Here is what I need to do:

    Column C needs to be sorted A-Z as it is a simple area identifying number, for example report in row 2 happened in area 2, report in row 3 happened in are 6 and so on...simples.

    Row F needs to be sorted by date but I want Row C to be the dominant rule, so if I can put it in words that aren't gibberish, when both rules are run Column C will organise all reports by area from 1,2,3,4 etc and then in Row F reports will have a secondary sort in to date order but keeping them listed in report area from Column C. So all showing a 1 in C will be at the top and then sorted in date order, all showing in column C with a 2 will then follow and be sorted in date order.

    Further to this I want the dates in Row F that are more than 20 days old from todays date to be highlight red.

    Is this combination of rules possible? if so any pointers on how to set it up would be appreciated.

    Hopefully that made sense as I don't know how to better explain it at half 5 on a Monday!

  2. #2
    Forum Contributor
    Join Date
    10-30-2014
    Location
    England
    MS-Off Ver
    2007 / 365
    Posts
    279

    Re: Conditional Formatting and Column Sorting

    Based on your description, and the fact you use a letter rather than a number, I'm going to assume you are entirely taking about columns and not rows.

    See attached image - the top is the Sort dialog, the bottom is the conditional formatting.

    To sort by Area, and then by Date, you just need to add 2 levels to your sort as it is hierarchical and will sort all your Area 1's together first, and then each Area 1 by Date... then it will do the same to you Area 2's etc.

    To implement the conditional formatting first you'll need add the formula =TODAY() to a cell elsewhere in your file, and for ease of use just name the cell something like DateCell etc. In the example image I have used $A$1 in place of this date cell, so just enter your cell name instead. As TODAY() is a volatile function (which will re-calculate on ANY change to the file), it's best to limit it to a single cell, and then just reference that cell rather than include it within every single cell in the Date column.
    Attached Images Attached Images
    Last edited by EchoPassenger; 09-05-2016 at 03:54 PM.

  3. #3
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Conditional Formatting and Column Sorting

    you should be able to manually sort
    1st sort order is column C
    then within that sort Column F (Add Level)

    for conditional formatting

    use

    = F1 < = today() - 20

    for 2007, 2010 or 2013 excel version
    Conditional Formatting

    Highlight applicable range >>

    F:F


    Home Tab >> Styles >> Conditional Formatting
    New Rule >> Use a formula to determine which cells to format
    Edit the Rule Description: Format values where this formula is true:


    = F1 < = today() - 20


    Format… [Number, Font, Border, Fill]
    choose the format you would like to apply when the condition is true
    OK >> OK



    OTHERWISE

    Please upload a small clean sample of your data / workbook (not a picture) to the forum, Make sure you have removed any private information, remember this is a public forum and so available to anyone
    We would like to see an example of your data and also a manual mock up of the expected results you want to achieve.

    To attach a file to your post,
    click "Go advanced" (next to quick post),
    scroll down until you see "manage Attachments",
    click that and select "Choose File" (top Left corner).
    Find your file, click "Open" click "upload" click 'close windows" Top Right. click "Submit Reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.

+ 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. Conditional formatting and sorting
    By dbrizor in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-04-2016, 12:54 PM
  2. Sorting with conditional formatting
    By skip2mylew in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-06-2013, 02:12 PM
  3. Sorting and conditional formatting
    By Renovacio in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-03-2008, 03:29 PM
  4. Sorting by Conditional Formatting
    By VegasL in forum Excel General
    Replies: 2
    Last Post: 12-10-2007, 01:40 PM
  5. Conditional Formatting and Re-sorting
    By Rainwater in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-06-2006, 02:40 PM
  6. sorting a range with conditional formatting
    By renie in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-02-2006, 05:50 PM
  7. [SOLVED] Keeping conditional formatting when sorting
    By Andrea A in forum Excel General
    Replies: 0
    Last Post: 04-04-2006, 10:10 AM

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