+ Reply to Thread
Results 1 to 20 of 20

Using Table Min/Max data in conditional formatting to flag if outside specified range

Hybrid View

  1. #1
    Registered User
    Join Date
    06-14-2018
    Location
    Minden, NV
    MS-Off Ver
    2016
    Posts
    8

    Thumbs up Using Table Min/Max data in conditional formatting to flag if outside specified range

    This is going to be hard for me to convey in text, so please bear with me.

    I have a Table which lists a group of sieve sizes in column A, minimum hole size in the sieve screen in column B, and maximum hole size in column C.
    size table.PNG

    I then have a calibration record, which lets you chose the sieve size from a list, followed by the manual input of (5) measurements referencing hole size openings taken with a set of calipers.
    Data Page.PNG

    My goal is to have all the columns of the hole size readings (1st - 5th) first lookup the sieve size, then determine whether or not it is within spec based off of the values in the table, then format the cell if it is outside of that particular sieve's spec, with the formatting I manually entered in the example.

    I have tried to figure it out for long enough, and am now beyond frustrated.

    Your help will be appreaciated,

    Joel

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2505
    Posts
    13,760

    Re: Using Table Min/Max data in conditional formatting to flag if outside specified range

    Please upload a representative Excel file and not a pic or screen shot. It saves having to retype data you clearly have already. You often get faster/more response if you do.

    If you are unfamiliar with how to do this (the paperclip icon does not work):


    To attach a file to your post: (Please no pics or screenshots ... saves retyping data.),
    • be sure to desensitize the data
    • click “Go Advanced” (next to Post Quick Reply – bottom right),
    • scroll down until you see “Manage Attachments”, click that,
    • click “Browse”.
    • select your file(s)
    • click “Upload”
    • click “Close window”
    • click “Submit Reply”

    The file name will appear at the bottom of your reply.
    Dave

  3. #3
    Registered User
    Join Date
    06-14-2018
    Location
    Minden, NV
    MS-Off Ver
    2016
    Posts
    8

    Re: Using Table Min/Max data in conditional formatting to flag if outside specified range

    Ok, here is a representative file. Thanks for your patience.
    Attached Files Attached Files

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Using Table Min/Max data in conditional formatting to flag if outside specified range

    What do you want? Where do you want to see it? Some manually calculated results on your sheet would be helpful...
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,303

    Re: Using Table Min/Max data in conditional formatting to flag if outside specified range

    I think the OP wants to highlight (CF) any readings that are not within tolerance based on the minimum and maximum values in the lookup table.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Using Table Min/Max data in conditional formatting to flag if outside specified range

    Maybe. However, dedonx... you have used merged cells. There should NEVER be used in the body of your data. Make the columns wider. It's still do-able, but will look like a dog's breakfast as a result.

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Using Table Min/Max data in conditional formatting to flag if outside specified range

    I have the CF formula... but can't apply it to your cell range. Never seen this behaviour before!!

    =AND(OFFSET($E55,,INT(COLUMNS($A:A)-1),,)>=VLOOKUP(Sheet1!$A55,Sieve_Table,2,FALSE),OFFSET($E55,,INT(COLUMNS($A:A)-1),,)<=VLOOKUP(Sheet1!$A55,Sieve_Table,3,FALSE))

    It must be something to do with those merged cells. I am not inclined to do any more on this. Either the merged cells go... or I do...
    Last edited by Glenn Kennedy; 08-08-2018 at 09:45 AM.

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Using Table Min/Max data in conditional formatting to flag if outside specified range

    It wasn't the merged cells. It was the structured table. This works. In-spec values are shown in Green.

    AND(OFFSET($E55,,INT(COLUMNS($A:A)-1),,)>=VLOOKUP(Sheet1!$A55,'Sieve Table'!$A$2:$C$25,2,FALSE),OFFSET($E55,,INT(COLUMNS($A:A)-1),,)<=VLOOKUP(Sheet1!$A55,'Sieve Table'!$A$2:$C$25,3,FALSE))
    Attached Files Attached Files

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,303

    Re: Using Table Min/Max data in conditional formatting to flag if outside specified range

    Good job, Glenn!

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Using Table Min/Max data in conditional formatting to flag if outside specified range

    Improved version.

    It seems that CF won't take structured table refs... unless you wrap them in INDIRECT. This now flags red those out of spec and green those in spec.

    for in spec:A)-1),,)>=VLOOKUP($A55,INDIRECT("Sieve_Table"),2,FALSE),OFFSET($E55,,INT(COLUMNS($A:A)-1),,)<=VLOOKUP($A55,INDIRECT("Sieve_Table"),3,FALSE))

    and for out of spec

    =IF(ISBLANK(E55),FALSE,NOT(AND(OFFSET($E55,,INT(COLUMNS($A:A)-1),,)>=VLOOKUP($A55,INDIRECT("Sieve_Table"),2,FALSE),OFFSET($E55,,INT(COLUMNS($A:A)-1),,)<=VLOOKUP($A55,INDIRECT("Sieve_Table"),3,FALSE))))

    So apart from merged cells, I have another thing to moan about - structured references.
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    06-14-2018
    Location
    Minden, NV
    MS-Off Ver
    2016
    Posts
    8

    Re: Using Table Min/Max data in conditional formatting to flag if outside specified range

    So don't do that again, is what I am getting from this.... Sorry Glenn.

  12. #12
    Registered User
    Join Date
    06-14-2018
    Location
    Minden, NV
    MS-Off Ver
    2016
    Posts
    8

    Re: Using Table Min/Max data in conditional formatting to flag if outside specified range

    I wanted to thank you guys for the work. While I did design these calibration reports, I had to try and mimic the forms that the company has been using for years. I didn't want to hit them with a bunch of change right out the gate. So this is on the right track of what I was looking for, but with opposite results. Since the form will be printed in B&W, having the cells that are out of spec highlighted instead of all of the good ones would be more effective. If the user inputs an extra digit, or a sieve is out of spec I want it to flag it so it can be corrected by either discarding the sieve or correcting the error. So to complicate things even further, the sieve sizes that are lead by an asterisk are visually inspected only, and will not have data entered in the (6) data entry columns (If that would make a difference).

    Thanks again for all your help.

  13. #13
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,303

    Re: Using Table Min/Max data in conditional formatting to flag if outside specified range

    So, just use the out of spec CF formula that Glenn has given you, not the in spec one.

    There are no asterisks in your sample data, so yes, that may well make a, um, huge difference!!!

  14. #14
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Using Table Min/Max data in conditional formatting to flag if outside specified range

    Delete the cf rule that shades green.

    The other bit won't matter. If theres nothing in the meadurement cells, no formatting will be applied.

    I am away now until uk morning time.

    But.. you're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

  15. #15
    Registered User
    Join Date
    06-14-2018
    Location
    Minden, NV
    MS-Off Ver
    2016
    Posts
    8

    Re: Using Table Min/Max data in conditional formatting to flag if outside specified range

    So now that I have applied the formula (=IF(ISBLANK(E55),FALSE,NOT(AND(OFFSET($E55,,INT(COLUMNS($A:A)-1),,)>=VLOOKUP($A55,INDIRECT("Sieve_Table"),2,FALSE),OFFSET($E55,,INT(COLUMNS($A:A)-1),,)<=VLOOKUP($A55,INDIRECT("Sieve_Table"),3,FALSE))))
    as the conditional formatting to the appropriate cells it is not doing anything. Did I miss something? I selected the groups of cells (per page) that need to be formatted as such, and then input the formula as the conditional formatting. If I didn't select the A:D columns it would seemingly select some cells on the third page and highlight them regardless of any valid data in the "Sieve Size" column. If I included those cells in the conditional formatting(which I am sure is incorrect) then nothing happens.
    Attached Files Attached Files

  16. #16
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Using Table Min/Max data in conditional formatting to flag if outside specified range

    Somehow or other you had it running from row 1048756!! CF formulae are sometimes a bit fragile and you should check them if they misbehave. Anyway, it's all fixed now.
    Attached Files Attached Files

  17. #17
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,303

    Re: Using Table Min/Max data in conditional formatting to flag if outside specified range

    Whenever you set ranges in CF rules, ALWAYS go back and double-check them. They do often change in this way, but once amended will stick. It's a frustration and must be an Excel bug. I see it often.

  18. #18
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2505
    Posts
    13,760

    Re: Using Table Min/Max data in conditional formatting to flag if outside specified range

    Quote Originally Posted by AliGW View Post
    Whenever you set ranges in CF rules, ALWAYS go back and double-check them. They do often change in this way, but once amended will stick. It's a frustration and must be an Excel bug. I see it often.
    I found that happened whenever I typed in or deleted the "$" manually. If I cycle through using F4 I've never had that happen again. Same is often true in the other managers ... Name, Data validation

  19. #19
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,303

    Re: Using Table Min/Max data in conditional formatting to flag if outside specified range

    Quote Originally Posted by FlameRetired View Post
    I found that happened whenever I typed in or deleted the "$" manually. If I cycle through using F4 I've never had that happen again. Same is often true in the other managers ... Name, Data validation
    Ah, interesting!

  20. #20
    Registered User
    Join Date
    06-14-2018
    Location
    Minden, NV
    MS-Off Ver
    2016
    Posts
    8

    Re: Using Table Min/Max data in conditional formatting to flag if outside specified range

    Y'all are amazing. thanks for the help!

+ 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. Find and Flag Missing Data Pair in a range of repeating data segments.
    By mgcarino14 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-29-2016, 09:37 AM
  2. Conditional formatting to flag dates
    By moretvicar in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-06-2015, 04:17 AM
  3. [SOLVED] Conditional Formatting: If Date in cell A1 is greater than 7 days old, flag B1 If blank
    By shepherdc2814 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-20-2013, 11:09 AM
  4. Replies: 14
    Last Post: 10-19-2011, 08:27 AM
  5. Excel 2007 use array formula to flag conditional data
    By ysuee in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-08-2010, 01:16 PM
  6. conditional formatting chart data table
    By mss5603 in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 11-05-2008, 10:13 AM
  7. Conditional formatting in a data table
    By TimR in forum Excel General
    Replies: 0
    Last Post: 10-05-2005, 02:28 PM

Tags for this Thread

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