+ Reply to Thread
Results 1 to 7 of 7

Highlight according to multiple criteria

  1. #1
    Registered User
    Join Date
    10-22-2009
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    80

    Highlight according to multiple criteria

    Hi all,


    I need some help creating a rule to highlight cells that correspond to some criterias.


    Column A = House numbers ( It has several numbers and some are duplicated )
    Column B = Date of Arrival
    Column C = Date of Departure

    What i wanted to do is to create a rule that if the same House has:

    Departure ( Date on Column C ) is equal to the Arrival ( Date on Column B ) are equal it highlights the House Number ( Column A ) cell corresponding to the Arrival Date.


    Example:

    Column A / Column B / Column C
    House / Arrival date / Departure date

    1 - 20-3-2010 - 24-3-2010
    1 - 24-3-2010 - 29-3-2010
    4 - 20-4-2010 - 25-4-2010
    12 - 12-3-2010 - 16-3-2010


    Meaning that it would highlight those above in red

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Highlight according to multiple criteria

    Assuming you are starting in Row2, select Column A to B range and apply conditional formula:

    =COUNTIFS($A$2:$A2,$A2,$C$2:$C2,$B2)
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    10-22-2009
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    80

    Re: Highlight according to multiple criteria

    Quote Originally Posted by NBVC View Post
    Assuming you are starting in Row2, select Column A to B range and apply conditional formula:

    =COUNTIFS($A$2:$A2,$A2,$C$2:$C2,$B2)

    Hi NBVC, i cant seem to make this work:

    I have attached a list so that you may be able to help me.


    You may notice that i've marked with and " x " in the adjacent columns the houses that meet the criterias below:


    PS: Want i want is that it only highlights the row if the following conditions are met:

    1 - Its the same house number and the departure date is the same as the next arrival date for the same house

    2 - Its the same house number and the departure date is one day before the next arrival date for the same house


    I hope that i'm not being a pain in the...

    Cheers
    Attached Files Attached Files

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Highlight according to multiple criteria

    I am assuming you want to different conditions so that you have 2 different patterns based on those separate conditions...

    For condition 1, (Its the same house number and the departure date is one day before the next arrival date for the same house) after selecting the entire range, select Use formula to determine which cells to format and enter:

    Please Login or Register  to view this content.
    select your formats.

    For condition 2 (Its the same house number and the departure date is the same as the next arrival date for the same house
    ):

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by NBVC; 09-29-2010 at 09:17 AM.

  5. #5
    Registered User
    Join Date
    10-22-2009
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    80

    Re: Highlight according to multiple criteria

    Thanks NBVC,

    As always you ROCK :P

    +1 For your fast help

  6. #6
    Registered User
    Join Date
    10-22-2009
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    80

    Re: Highlight according to multiple criteria

    To the MOD's, for some reason i can't edit the first post to mark as SOLVED.

    Can you please do this. Thanks

  7. #7
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: Highlight according to multiple criteria

    "some reason" is that you started the thread more than 2 days ago.

    Marked solved.

+ 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