+ Reply to Thread
Results 1 to 10 of 10

Seeking advanced conditional formatting formula

  1. #1
    Registered User
    Join Date
    04-16-2013
    Location
    Boston, Massachusetts
    MS-Off Ver
    Excel 2010
    Posts
    50

    Seeking advanced conditional formatting formula

    Hi all,

    See the attached spreadsheet, referenced is this request. In column A is a list of Site numbers, in which there are duplicates (site numbers can be repeated in several rows). In column B is the group number associated to a given site number.

    I would like to create a conditional formatting formula that looks at all instances of a given site number, in column a, and if one instance of a site number is associated to either "200-103" or "200-104" in column B, then all rows with the same site number should be flagged. For example, since "Site 17" is associated to "200-104" I would want each row for "Site 17" to be flagged


    Thanks in advance for any help with this!
    Attached Files Attached Files

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Seeking advanced conditional formatting formula

    i used this as the formula for conditional format
    =OR(ISNUMBER(MATCH($A2&"200-103",INDEX($A$2:$A$200&$B$2:$B$200,0),0)),ISNUMBER(MATCH($A2&"200-104",INDEX($A$2:$A$200&$B$2:$B$200,0),0)))
    is that what you mean? see attached
    Attached Files Attached Files
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Seeking advanced conditional formatting formula

    Try this under NEW RULE/Use Formula....
    =IFERROR(MATCH(A2&"200-103",$A$2:$A$45&$B$2:$B$45,0),MATCH(A2&"200-104",$A$2:$A$45&$B$2:$B$45,0))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    04-16-2013
    Location
    Boston, Massachusetts
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Seeking advanced conditional formatting formula

    Hi, and thank you martindwilson! This is so close to what I need - I do not want to flag sites when they are only associated to 222-103 and/or 222-104. For example, sites 2,4,5,7, and 8 wouldn't be flagged. Does that make sense?

  5. #5
    Registered User
    Join Date
    04-16-2013
    Location
    Boston, Massachusetts
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Seeking advanced conditional formatting formula

    Thank you... Again, close, but I would like to exclude sites from being flagged when they are only associated to 222-103 and 222-104. is that possible?

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Seeking advanced conditional formatting formula

    For example, since "Site 17" is associated to "200-104" I would want each row for "Site 17" to be flagged
    So you only want duplicates?

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Seeking advanced conditional formatting formula

    change the formula to this...

    =IF(OR(COUNTIFS($A$2:$A$45,$A2,$B$2:$B$45,"200-103")=1,COUNTIFS($A$2:$A$45,$A2,$B$2:$B$45,"200-104")=1),"",IFERROR(MATCH(A2&"200-103",$A$2:$A$45&$B$2:$B$45,0),MATCH(A2&"200-104",$A$2:$A$45&$B$2:$B$45,0)))

  8. #8
    Registered User
    Join Date
    04-16-2013
    Location
    Boston, Massachusetts
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Seeking advanced conditional formatting formula

    A cluster of site numbers should be highlighted when: One of the rows has 222-103 or 222-104 as a group number, and there is at least one other row with different other group number(i.e. 110-102,110-104). Do not flag when a given site number is only associated to 222-103 or 222-104.

    Sorry, seems to be a bit hard to explain. Hope that makes more sense.

  9. #9
    Registered User
    Join Date
    04-16-2013
    Location
    Boston, Massachusetts
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Seeking advanced conditional formatting formula

    FDibbins, that was correct!! you're a superstar! That's going to save a ton of manual labor. Thanks!

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Seeking advanced conditional formatting formula

    Happy to help and thanks for the feedback

+ 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. Seeking advanced conditional formatting formula
    By shepherdc2814 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-18-2013, 12:30 AM
  2. Advanced Excel User seeking VBA help
    By Roverer in forum Hello..Introduce yourself
    Replies: 2
    Last Post: 05-13-2013, 08:19 PM
  3. [SOLVED] Seeking knowledge on certain advanced options
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 02-14-2013, 10:23 PM
  4. Advanced Conditional Formatting
    By dimitrz in forum Excel General
    Replies: 10
    Last Post: 09-13-2008, 04:42 AM
  5. Replies: 2
    Last Post: 07-21-2006, 10:05 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