Issues with Conditional Formatting Cells dependent on VLOOKUP

%3CLINGO-SUB%20id%3D%22lingo-sub-1118578%22%20slang%3D%22en-US%22%3EIssues%20with%20Conditional%20Formatting%20Cells%20dependent%20on%20VLOOKUP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1118578%22%20slang%3D%22en-US%22%3E%3CP%3EHey%20Everyone%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20been%20having%20enormous%20issues%20trying%20to%20resolve%20a%20conditional%20formatting%20problem%20within%20an%20Excel%20Sheet%20because%20the%20cells%20referenced%20in%20the%20rules%20I%20create%20are%20dependent%20on%20the%20VLOOKUP%20function.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20running%20Excel%20on%20Microsoft%20Office%20Professional%20Plus%202010.%20I%20am%20attaching%20a%20%22dummy%22%20file%20that%20I%20put%20together%20so%20anyone%20could%20play%20around%20with%20the%20file%20to%20get%20a%20better%20idea%20of%20what%20I%20am%20trying%20to%20do.%3C%2FP%3E%3CP%3E.%3C%2FP%3E%3CP%3E.%3C%2FP%3E%3CP%3E%3CSTRONG%3ETab%3A%20IP%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E-%20Applicable%20field%20is%20the%20%22SELECT%20PART%23%22%20as%20this%20is%20used%20in%20my%20VLOOKUP%20function%3C%2FP%3E%3CP%3E%3CSTRONG%3ETab%3A%20INSP%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E-%20Row%2010%20is%20of%20interest%20here%2C%20specifically%20the%20columns%20of%20K%20and%20L.%3C%2FP%3E%3CP%3E-%20E%2C%20F%2C%20G%20will%20be%20auto-populated%20based%20on%20the%20selected%20part%20number%20from%20the%20IP%20tab%3C%2FP%3E%3CP%3E-%20K%20and%20L%20are%20where%20the%20conditional%20Formatting%20lies.%20See%20%22KEY%22%20tab%20for%20more%20on%20what%20the%20three%20rules%20are%20for%20the%20conditional%20formatting.%3C%2FP%3E%3CP%3E%3CSTRONG%3ETab%3A%20DATA%20TABLE%3CBR%20%2F%3E%3C%2FSTRONG%3E-%20Values%20from%20this%20table%20are%20the%20ones%20being%20pulled%20using%20the%20VLOOKUP%20function.%20Specifically%2C%20columns%207%20and%208%20are%20important%20because%20these%20columns%20are%20referenced%20directly%20in%20the%20conditional%20formatting.%3CSTRONG%3E%3CBR%20%2F%3ETab%3A%20KEY%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E-%20This%20tab%20highlights%20the%20generic%20form%20of%20the%20VLOOKUP%20function%20I%20am%20using.%20The%20explanation%20on%20the%20right%20describes%20what%20to%20change%20within%20the%20formula%20to%20adjust%20for%20a%20separate%20column%20on%20the%20%22DATA%20TABLE%22%20tab%20(highlighted%20in%20blue%20on%20said%20tab).%3C%2FP%3E%3CP%3E-%20Additionally%2C%20the%20Goals%20of%20the%20Conditional%20Formatting%20are%20laid%20out%20with%20their%20generic%20forms%20and%20reasoning%20for%20what%20each%20rule%20should%20be%20doing%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3CU%3EQUESTION%20(Please%20refer%20to%20excel%20file%20for%20specifics)%3A%3C%2FU%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EOn%20the%20%3CSTRONG%3EINSP%3C%2FSTRONG%3E%20tab%3A%3C%2FP%3E%3CP%3EThe%20rules%20for%20the%20conditional%20Formatting%20are%20not%20working%20how%20I%20would%20like%20them%20to.%20I%20have%20them%20set%20up%20to%20compare%20the%20result%20within%20the%20Min%2FMax%20column%20to%20the%20Lower%2FUpper%20Limit%20that%20is%20auto-populated%20based%20on%20the%20Part%20Number%20chosen%20on%20the%20IP%20tab.%20Basically%2C%20if%20the%20value%20inputted%20into%20Min%2FMax%20column%20is%20OUTSIDE%20of%20the%20Lower%20to%20Upper%20Limit%20range%3B%20I%20need%20the%20Min%2FMax%20cell%20to%20format%20%3CU%3Ered%3C%2FU%3E.%20Conversely%2C%20if%20the%20value%20is%20INSIDE%20this%20range%3B%20I%20need%20the%20cell%20to%20format%20to%20%3CU%3Ewhite%20(n%3C%2FU%3E%3CSPAN%3E%3CU%3Eo-fill)%3C%2FU%3E.%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3ESince%20the%20Lower%2FUpper%20Limit%20cells%20contain%20a%20formula%20(VLOOKUP)%2C%20I%20believe%20this%20is%20breaking%20the%20rules%20I%20create%20and%20causing%20any%20value%20inputted%20in%20the%20Min%2FMax%20section%20(whether%20inside%20or%20outside%20of%20Limit%20Range)%20to%20constantly%20format%20the%20cell%20red.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E.%3C%2FP%3E%3CP%3E.%3C%2FP%3E%3CP%3EI%20have%20exhausted%20so%20many%20hours%20into%20messing%20around%20with%20the%20conditional%20formatting%20and%20research%20online%20through%20various%20websites%20and%20help%20forums%2C%20I%20do%20not%20know%20what%20else%20to%20do.%20Please%20Help.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1118578%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1118667%22%20slang%3D%22en-US%22%3ERe%3A%20Issues%20with%20Conditional%20Formatting%20Cells%20dependent%20on%20VLOOKUP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1118667%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F525817%22%20target%3D%22_blank%22%3E%40AnthonyCappuccio%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CBR%20%2F%3ERules%20should%20be%20ordered%20this%20way%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYellow%3A%20%3DISBLANK(K%2410)%26nbsp%3B%20STOP%20IF%20TRUE%20CHECKED%3C%2FP%3E%3CP%3EWhite%3A%20%3DAND(K%2410%26gt%3B%3DVALUE(%24F10)%2CK%2410%26lt%3B%3DVALUE(%24G10))%3C%2FP%3E%3CP%3ERed%3A%20%3DOR(K%2410%3CVALUE%3EVALUE(%24G10))%3C%2FVALUE%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1118912%22%20slang%3D%22en-US%22%3ERe%3A%20Issues%20with%20Conditional%20Formatting%20Cells%20dependent%20on%20VLOOKUP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1118912%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F428790%22%20target%3D%22_blank%22%3E%40Patrick2788%3C%2FA%3E%26nbsp%3BThank%20you%20so%20much%20for%20the%20response.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20a%20follow%20up%20question%20if%20you%20don't%20mind%3A%3C%2FP%3E%3CP%3EI%20would%20like%20to%20apply%20these%20set%20of%20rules%20to%20a%20large%20range%20of%20rows%20(roughly%20100)%2C%20is%20there%20a%20way%20to%20%22roll%22%20this%20rule%20down%20along%20multiple%20cells%20or%20would%20I%20have%20to%20input%20the%20rule%20into%20each%20individual%20cell%3F%20The%20only%20change%20in%20the%20rules%20from%20row%20to%20row%20would%20be%20the%20row%20number%20(in%20the%20case%20of%20your%20post%20and%20my%20example%20sheet%2C%20the%20number%2010%20would%20be%20the%20item%20in%20the%20equations%20you%20posted%20that%20would%20be%20changing%20per%20row).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20say%20roll%20with%20quotations%20because%20I%20know%20excel%20has%20the%20feature%20that%20if%20you%20type%20a%20number%20into%20a%20cell%2C%20say%201%20for%20example%2C%20and%20drag%20the%20little%20black%20box%20in%20the%20bottom%20right%20corner%20of%20the%20cell%20and%20select%20%22Fill%20Series%22%20it%20will%20chronologically%20list%20from%20the%20number%201%2C%20automatically%20into%20the%20corresponding%20cells.%20I%20have%20been%20using%20the%20brute%20force%20method%20of%20inputting%20into%20individual%20cells%20but%20obviously%20that%20is%20time%20consuming%20and%20tedious%20so%20I%20would%20like%20to%20avoid%20doing%20this%20if%20possible%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1123257%22%20slang%3D%22en-US%22%3ERe%3A%20Issues%20with%20Conditional%20Formatting%20Cells%20dependent%20on%20VLOOKUP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1123257%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F428790%22%20target%3D%22_blank%22%3E%40Patrick2788%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20the%20feedback%20Patrick.%20Using%20the%20'Applies%20To'%20section%20will%20not%20work%20for%20my%20case%20because%20the%20rule%20itself%20would%20still%20be%20checking%20cells%20F10%20and%20G10%20(I%20am%20referencing%20the%20equations%20you%20wrote%20out%20as%20the%20original%20response%20on%20this%20post).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBy%20rolling%20the%20rule%20downward%20to%20apply%20to%20more%20cells%2C%20I%20would%20additionally%20need%20the%20mention%20of%20F10%20and%20G10%20to%20roll%20as%20well%20(i.e.%20one%20row%20down%20the%20rules%20would%20need%20to%20change%20to%20F11%20and%20G11).%20I%20know%20this%20is%20very%20specific%20and%20having%20the%20rules%20themselves%20actually%20change%20is%20the%20part%20that%20may%20very%20well%20be%20obtainable%20in%20excel%2C%20wanted%20to%20put%20it%20out%20there%20just%20in%20case.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAlso%2C%20thank%20you%20again%20on%20the%20equation%20formatting.%20That%20really%20was%20a%20huge%20help%20for%20me.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1119918%22%20slang%3D%22en-US%22%3ERe%3A%20Issues%20with%20Conditional%20Formatting%20Cells%20dependent%20on%20VLOOKUP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1119918%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F525817%22%20target%3D%22_blank%22%3E%40AnthonyCappuccio%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGo%20into%20manage%20rules%20and%20adjust%20the%20applies%20to%20box.%26nbsp%3B%20Included%20a%20screen%20cap%20for%20reference%20(These%20aren't%20using%20your%20rules.%20Just%20a%20sample).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F166272i4699587C8CEFF27B%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22clipboard_image_0.png%22%20title%3D%22clipboard_image_0.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20don't%20extend%20conditional%20formatting%20this%20way%20the%20other%20ways%20are%20using%20a%20table%20or%20the%20format%20painter.%26nbsp%3B%20The%20latter%20has%20a%20few%20nuances.%26nbsp%3B%20For%20example%2C%20if%20A1%3AB1%20contain%20conditional%20formatting%20rules%2C%20you%20select%20those%20cells%2C%20click%20format%20painter%2C%20then%20brush%20the%20cells%20to%20extend%20-%20let's%20say%20A2%3AB10.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hey Everyone,

 

I have been having enormous issues trying to resolve a conditional formatting problem within an Excel Sheet because the cells referenced in the rules I create are dependent on the VLOOKUP function.

 

I am running Excel on Microsoft Office Professional Plus 2010. I am attaching a "dummy" file that I put together so anyone could play around with the file to get a better idea of what I am trying to do.

.

.

Tab: IP

- Applicable field is the "SELECT PART#" as this is used in my VLOOKUP function

Tab: INSP

- Row 10 is of interest here, specifically the columns of K and L.

- E, F, G will be auto-populated based on the selected part number from the IP tab

- K and L are where the conditional Formatting lies. See "KEY" tab for more on what the three rules are for the conditional formatting.

Tab: DATA TABLE
- Values from this table are the ones being pulled using the VLOOKUP function. Specifically, columns 7 and 8 are important because these columns are referenced directly in the conditional formatting.
Tab: KEY

- This tab highlights the generic form of the VLOOKUP function I am using. The explanation on the right describes what to change within the formula to adjust for a separate column on the "DATA TABLE" tab (highlighted in blue on said tab).

- Additionally, the Goals of the Conditional Formatting are laid out with their generic forms and reasoning for what each rule should be doing

 

QUESTION (Please refer to excel file for specifics):

On the INSP tab:

The rules for the conditional Formatting are not working how I would like them to. I have them set up to compare the result within the Min/Max column to the Lower/Upper Limit that is auto-populated based on the Part Number chosen on the IP tab. Basically, if the value inputted into Min/Max column is OUTSIDE of the Lower to Upper Limit range; I need the Min/Max cell to format red. Conversely, if the value is INSIDE this range; I need the cell to format to white (no-fill).

 

Since the Lower/Upper Limit cells contain a formula (VLOOKUP), I believe this is breaking the rules I create and causing any value inputted in the Min/Max section (whether inside or outside of Limit Range) to constantly format the cell red.

.

.

I have exhausted so many hours into messing around with the conditional formatting and research online through various websites and help forums, I do not know what else to do. Please Help.

 

5 Replies

@AnthonyCappuccio 


Rules should be ordered this way:

 

Yellow: =ISBLANK(K$10)  STOP IF TRUE CHECKED

White: =AND(K$10>=VALUE($F10),K$10<=VALUE($G10))

Red: =OR(K$10<VALUE($F10),K$10>VALUE($G10))

@Patrick2788 Thank you so much for the response. 

 

I have a follow up question if you don't mind:

I would like to apply these set of rules to a large range of rows (roughly 100), is there a way to "roll" this rule down along multiple cells or would I have to input the rule into each individual cell? The only change in the rules from row to row would be the row number (in the case of your post and my example sheet, the number 10 would be the item in the equations you posted that would be changing per row).

 

I say roll with quotations because I know excel has the feature that if you type a number into a cell, say 1 for example, and drag the little black box in the bottom right corner of the cell and select "Fill Series" it will chronologically list from the number 1, automatically into the corresponding cells. I have been using the brute force method of inputting into individual cells but obviously that is time consuming and tedious so I would like to avoid doing this if possible

@AnthonyCappuccio 

Go into manage rules and adjust the applies to box.  Included a screen cap for reference (These aren't using your rules. Just a sample).

 

clipboard_image_0.png

 

If you don't extend conditional formatting this way the other ways are using a table or the format painter.  The latter has a few nuances.  For example, if A1:B1 contain conditional formatting rules, you select those cells, click format painter, then brush the cells to extend - let's say A2:B10.

@Patrick2788 

Thank you for the feedback Patrick. Using the 'Applies To' section will not work for my case because the rule itself would still be checking cells F10 and G10 (I am referencing the equations you wrote out as the original response on this post).

 

By rolling the rule downward to apply to more cells, I would additionally need the mention of F10 and G10 to roll as well (i.e. one row down the rules would need to change to F11 and G11). I know this is very specific and having the rules themselves actually change is the part that may very well be obtainable in excel, wanted to put it out there just in case.

 

Also, thank you again on the equation formatting. That really was a huge help for me.

@AnthonyCappuccio 

Conditional formatting with a formula and a range of cells is built with the first row in the range in mind.  As long as you use correct referencing styles the references to F and G should change accordingly by the row.