+ Reply to Thread
Results 1 to 9 of 9

flag out of range values based on set of criteria and reference range

  1. #1
    Registered User
    Join Date
    01-07-2014
    Location
    Philadelphia
    MS-Off Ver
    Excel 2010
    Posts
    54

    flag out of range values based on set of criteria and reference range

    Hi,
    Can someone please help me with a conditional formatting problem? I've been pulling my hair over this.
    On tab 1, I have patient lab values and on second tab I have the reference range. Can a formula be develop to flag the outliners for specific test given the site & lab name match on both tab? Thank you.
    Attached Files Attached Files
    Last edited by Excel_learner; 04-19-2016 at 11:37 AM. Reason: as requested

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

    Re: conditional formatting again

    I am sure this can be done but can you describe a little more how to read this data? For example, on "tab 1" which is the sheet Value, there are Subject Numbers and Patient IDs. The second tab "LNR" has Subject Number but that seems to match the Patient ID on the other page, not the Patient number. And the values on Value have some dates earlier than the dates on LNR.

    So walk me through this. If I am looking at Patient 000418 tested at MDACC on 2/8/2016 and Albumin is 45.0, how do I look up the reference range for that number on the LNR sheet?
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  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,936

    Re: conditional formatting again

    Please take a moment to read the forum rules and then amend your thread title to something descriptive of your problem - not what you think the answer might be. (think google search terms?). Once you have done this please send me a PM and I will remove this request. (Also, include a link to your thread - copy from the address bar)

    Many members search our previous posts, and thread titles play a big part of the search. I doubt anybody would do a search based on your title?

    To change a Title on your post, click EDIT POST then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (note: this change is not optional )
    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
    01-07-2014
    Location
    Philadelphia
    MS-Off Ver
    Excel 2010
    Posts
    54

    flag out of range values based on set of criteria and reference range

    Hi Jeff, thank you for looking into this. Basically, I need some formulation to run through the test results in the [Value] tab, compared them with the range from the LNR based on matched criteria (site and lab name) and highlight the out of range values .
    For example, patient 0450 (lab=MDACC and site = 0004) has albumin value of 34.0 in red text. Normal range for same lab and site is 35 - 47 ([LNR] columns E & F). How do I fomulate to highlight this value?
    If 2 criteria is too complicated, is one criteria better to managed?
    Please use the new attachment.

    Thanks again.
    Attached Files Attached Files
    Last edited by Excel_learner; 04-19-2016 at 11:38 AM.

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

    Re: flag out of range values based on set of criteria and reference range

    Before I dive into this any further, I notice two things.

    LNR has multiple entries for the same combination of Site and Lab. Why is that? In this case the entries are duplicates but can you have multiple entries with different numbers? If not, why not just have a single entry for each combination?

    LNR has effective dates, but you don't mention this in your search criteria. Can effective dates be ignored? That is, if a patient test date is earlier than the effective date in LNR, what do you do?

  6. #6
    Registered User
    Join Date
    01-07-2014
    Location
    Philadelphia
    MS-Off Ver
    Excel 2010
    Posts
    54

    Re: flag out of range values based on set of criteria and reference range

    the spreadsheets are truncated of a huge data set. the site and lab combination should not have different numbers. They were just repeatedly entered for each patient at the same site. Don't worry about effective date. It's there to show when site use one lab and switch to another. Site & lab combination should be OK.

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

    Re: flag out of range values based on set of criteria and reference range

    Conditional formatting does not allow references to other sheets in formulas, but it does allow named formulas. So I used named formulas for each column of the low and high values in LNR.

    I also added a "helper" column in LNR to provide a key to combine the site and lab. It might be possible without it, but it makes things a lot easier, especially when doing CF.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    01-07-2014
    Location
    Philadelphia
    MS-Off Ver
    Excel 2010
    Posts
    54

    Re: flag out of range values based on set of criteria and reference range

    Oh gosh... I could go bald & wouldn't be able to come up with a formula like this. Although I don't understand what it does, i hope to be able to replicate it for other tests. These are not even a quarter of the stuff that I need to review. Thanks so much! You saved my hair ... & life :-)

  9. #9
    Registered User
    Join Date
    01-07-2014
    Location
    Philadelphia
    MS-Off Ver
    Excel 2010
    Posts
    54

    Re: flag out of range values based on set of criteria and reference range

    I know I just marked this as solved. Please forgive me for asking a bonus question if it's possible to highlight the lower value in green and higher in red? Thank you.

+ 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. Replies: 9
    Last Post: 03-07-2016, 10:39 AM
  2. Conditional Formatting Removing Previous Conditional Formatting?
    By CravingGod in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-04-2016, 01:02 PM
  3. Replies: 6
    Last Post: 01-08-2016, 06:44 PM
  4. Opening xlsm files with conditional formatting opens with removed conditional formatting
    By Martijn.Steenbakker in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-07-2014, 05:38 AM
  5. Replies: 1
    Last Post: 09-20-2013, 06:23 PM
  6. Delete Conditional Formatting conditions but keep cell formatting - Excel 2010
    By tetreama in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-09-2012, 08:28 PM
  7. Replies: 3
    Last Post: 05-15-2012, 04:13 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