Example - Mechanical Inspection using AQL

%3CLINGO-SUB%20id%3D%22lingo-sub-1337841%22%20slang%3D%22en-US%22%3EExample%20-%20Mechanical%20Inspection%20using%20AQL%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1337841%22%20slang%3D%22en-US%22%3E%3CP%3EHey%20Everyone%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20looking%20to%20create%20conditional%20formatting%20on%20a%20range%20of%20cells%20that%20will%20populate%20said%20cells%20based%20off%20of%20an%20AQL%20table.%20I%20have%20attached%20the%20excel%20file%20that%20shows%20the%20data%20and%20what%20I%20am%20trying%20to%20do.%20There%20is%20a%20text%20box%20on%20%22TAB%202%22%20that%20explains%20the%20goal%20of%20what%20I%20am%20trying%20to%20achieve.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20believe%20I%20will%20need%20to%20use%20an%20equation%20to%20format%20the%20cells%20but%20based%20off%20prior%20research%20into%20excel%20functions%20-%20I%20think%20this%20formula%20will%20need%20to%20be%20a%20little%20sophisticated.%20I%20believe%20currently%20that%20the%20formula%20will%20need%20to%20be%20some%20variation%20of%20a%20nested%20VLookup%20function%20or%20possibly%20a%20VLookup%20nested%20with%20an%20HLookup.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENOTE%3A%3C%2FP%3E%3CP%3EThe%20%22TABLE%22%20tab%20lists%20'Lot%20Size'%20as%20ranges.%20Currently%20I%20am%20skeptical%20about%20leaving%20this%20as%20a%20range%20because%20I%20think%20it%20will%20make%20the%20equation%20needed%20even%20more%20complicated%20(unless%20this%20task%20can%20be%20performed%20using%20the%20approximate%20return%20of%20V%2FHLookup%20which%20I%20am%20unsure%20of%20but%20thought%20it%20has%20potential).%20If%20necessary%20I%20am%20open%20to%20creating%20a%20table%20that%20has%20one%20cell%20per%20one%20lot%20size%20(i.e.%20C5%3D2%2C%20C6%3D3%2C%20C7%3D4%2C%20etc.)%20in%20order%20to%20make%20this%20work.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1337841%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-1337946%22%20slang%3D%22en-US%22%3ERe%3A%20Example%20-%20Mechanical%20Inspection%20using%20AQL%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1337946%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%0A%3CP%3EI'd%20do%20that%20with%20helper%20ranges%2Fcells.%20For%20the%20main%20table%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20422px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F186666i31762FCDEA815405%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3Eadd%20percents%20as%20numbers%2C%20not%20as%20texts%20on%20the%20top%2C%20and%20on%20the%20left%20low%20boundary%20of%20ranges.%3C%2FP%3E%0A%3CP%3EHere%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20314px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F186667iBF12139E7B21F63B%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3Ein%20B1%20how%20we%20interpret%20ALL%2C%20and%20in%20C1%20formula%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%3DIFERROR(%0A%20%20%20--INDEX(TABLE!%24D%245%3A%24S%2419%2C%0A%20%20%20%20%20%20LOOKUP('TAB%201'!%24E%243%2CTABLE!%24A%245%3A%24A%2419%2C(ROW(TABLE!%24A%245%3A%24A%2419)-ROW(TABLE!%24C%244)))%2C%0A%20%20%20%20%20%20MATCH('TAB%201'!%24E%245%2CTABLE!%24D%243%3A%24S%243%2C1))%2C%0A'TAB%202'!%24B%241)%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3Eand%20conditional%20formatting%20rule%20formula%20as%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%3D(ROW()%26gt%3BROW(%24C%242))*(ROW()%26lt%3B%3D(%24C%241%2BROW(%24C%242)))%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EIt%20could%20be%20combined%20al%20together%20in%20one%20formula%2C%20but%20it%20will%20be%20hard%20to%20maintain%20such.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1338005%22%20slang%3D%22en-US%22%3ERe%3A%20Example%20-%20Mechanical%20Inspection%20using%20AQL%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1338005%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%3CSPAN%3E%26nbsp%3Bdon't%20forget%20to%20update%20the%20cells%20the%20formatting%20will%20apply%20to%20in%20case%20you%20have%20a%20situation%20when%20the%20value%20is%20greater%20than%2020.%3C%2FSPAN%3E%3C%2FP%3E%3CDIV%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Formatting.JPG%22%20style%3D%22width%3A%20743px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F186671i4544FAD99C94CC12%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Formatting.JPG%22%20alt%3D%22Formatting.JPG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3Bis%20there%20a%20reason%20why%20the%20iferror%20function%20should%20return%20%22Tab2%20B1%22%20which%20has%20100%2C000%20as%20its%20value%3F%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1338114%22%20slang%3D%22en-US%22%3ERe%3A%20Example%20-%20Mechanical%20Inspection%20using%20AQL%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1338114%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESergei%20-%20Thank%20you%20for%20taking%20the%20time%20to%20explain%20this%20so%20thoroughly.%20I%20am%20not%20nearly%20this%20experienced%20in%20Excel%20so%20to%20come%20up%20with%20this%20would%20be%20near%20impossible%20for%20me.%20I%20really%20do%20appreciate%20the%20help!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EA%20few%20questions%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3COL%3E%3CLI%3EWhen%20you%20say%20it%20would%20be%20hard%20to%20maintain%20this%20as%20one%20formula%20are%20you%20referring%20to%20excel's%20ability%20to%20maintain%20it%20and%20process%20the%20formula%20within%20the%20formatting%3F%3C%2FLI%3E%3CLI%3EAlso%2C%20I%20did%20not%20mention%20this%20on%20the%20post%20but%20another%20key%20aspect%20of%20this%20whole%20thing%20is%20that%20I%20need%20the%20yellow%20cells%20to%20turn%20back%20to%20white%20after%20information%20is%20manually%20inputted.%20Meaning%20after%20the%20Quantity%20and%20AQL%20are%20entered%20on%20TAB%201%2C%20the%20purpose%20of%20this%20sheet%20will%20be%20for%20a%20mechanical%20inspector%20to%20input%20data%20into%20these%20yellow%20cells%20based%20on%20a%20tolerance%20range%20for%20a%20feature.%20Upon%20entering%20the%20value%20into%20the%20yellow%20cell%20on%20TAB%202%26nbsp%3BI%20would%20need%20the%20cell%20to%20then%20change%20from%20yellow%20to%20white%20signifying%20data%20has%20been%20entered.%3C%2FLI%3E%3CLI%3EIs%20this%20an%20easy%20addition%20given%20the%20way%20you%20had%20written%20the%20formula%20on%20the%20excel%20file%20you%20had%20provided%3F%3C%2FLI%3E%3C%2FOL%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F622486%22%20target%3D%22_blank%22%3E%40wumolad%3C%2FA%3E%26nbsp%3B%20Thanks%20for%20the%20heads%20up.%20I%20had%20taken%20this%20into%20consideration%20-%20I%20didn't%20want%20to%20complicate%20this%20example%20file%20too%20much%20but%20I%20definitely%20will%20be%20extending%20this%20past%2020%20pieces!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1338422%22%20slang%3D%22en-US%22%3ERe%3A%20Example%20-%20Mechanical%20Inspection%20using%20AQL%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1338422%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F622486%22%20target%3D%22_blank%22%3E%40wumolad%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENo%20reason%20except%20that%20shall%20be%20some%20number%20to%20apply%20formatting.%20I%20know%20nothing%20about%20that%20business%20and%20have%20no%20idea%20that%20ALL%20could%20mean%20on%20practice.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1338439%22%20slang%3D%22en-US%22%3ERe%3A%20Example%20-%20Mechanical%20Inspection%20using%20AQL%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1338439%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%0A%3CP%3E1)%20It'll%20be%20much%20harder%20to%20change%20the%20formula%20and%20much%20longer%20to%20develop%20it.%20If%20you%20don't%20like%20to%20have%20all%20these%20additional%20cells%20together%20with%20main%20data%2C%20such%20data%20preparation%20calculations%20could%20be%20moved%20on%20separate%20sheet%20(both%20table%20helper%20columns%20and%20intermediate%20calculations)%20and%20such%20sheet%20could%20be%20hided%20not%20to%20show%20it%20to%20end%20user.%3C%2FP%3E%0A%3CP%3E2)%20Not%20to%20color%20cells%20with%20data%20we%20may%20check%20if%20the%20cell%20is%20empty%20or%20not%20by%20one%20more%20criteria%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%3D(ROW()%26gt%3BROW(%24C%242))*(ROW()%26lt%3B%3D(%24C%241%2BROW(%24C%242)))*(C3%3D%22%22)%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E3)%20Not%20sure%20I%20understood%20this%20question%2C%20could%20you%20please%20clarify%20a%20bit.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1339355%22%20slang%3D%22en-US%22%3ERe%3A%20Example%20-%20Mechanical%20Inspection%20using%20AQL%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1339355%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20the%20suggestion.%20I%20will%20most%20likely%20end%20up%20adding%20the%20formula%20to%20the%20sheet%20where%20the%20table%20is%20located%20as%20the%20sheet%20involving%20the%20recording%20of%20the%20feature%20will%20have%20to%20maintain%20a%20certain%20appearance%20that%20will%20need%20this%20hidden.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20new%20formula%20you%20updated%20for%20%232%20was%20exactly%20what%20I%20was%20looking%20for.%20I%20was%20trying%20to%20ask%20you%20(in%20question%203)%20if%20adding%20the%20step%20about%20switching%20from%20yellow%20to%20white%20when%20data%20is%20entered%20would%20be%20difficult%20based%20on%20what%20you%20initially%20provided%20but%20I%20see%20now%20how%20you%20included%20it.%3C%2FP%3E%3CP%3E.%3C%2FP%3E%3CP%3E.%3C%2FP%3E%3CP%3E%3CU%3EOne%20question%20I%20have%20regarding%20ALL%3A%3C%2FU%3E%3C%2FP%3E%3CP%3EAs%20I'm%20messing%20around%20with%20the%20file%20you%20sent%20I'm%20noticing%20when%20a%20value%20for%20AQL%20and%20Quantity%20are%20chosen%20that%20correlate%20to%20%22ALL%22%20in%20the%20TABLE%20-%20this%20results%20in%20all%2020%20piece%20%23's%20flagging%20yellow.%20%3CSTRONG%3EHow%20would%20I%20alter%20this%20so%20that%20%22ALL%22%20in%20the%20TABLE%20tab%20is%20reflective%20of%20the%20Quantity%20entered%20on%20TAB%201%3F%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%5Bfor%20example%5D%20The%20attached%20filed%20I%20added%2C%20the%20Quantity%20is%205%20and%20AQL%20is%200.01%25.%20From%20the%20table%20this%20is%20defined%20as%20ALL%20and%20TAB%202%20highlights%20all%2020%20piece%20%23's%20listed%20on%20TAB%202.%20In%20this%20case%20there%20are%20only%205%20parts%20in%20the%20quantity%20so%20ideally%20only%205%20piece%20%23's%20would%20need%20to%20be%20highlighted%20on%20TAB%202.%3C%2FP%3E%3CP%3E%3CSTRONG%3EEssentially%20the%20connection%20I%20am%20making%20is%20if%20ALL%20is%20the%20chosen%20cell%20from%20the%20TABLE%20then%20the%20highlighted%20cells%20would%20be%20reflective%20of%20the%20exact%20quantity%20indicated%20on%20TAB%201.%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20where%20I%20mentioned%20in%20the%20original%20post%20that%20I%20was%20skeptical%20about%20ranges%20and%20considered%20making%20this%20table%20much%20larger%20to%20include%20one%20number%20per%20lot%20size%20in%20fear%20of%20this%20exact%20need%20being%20to%20complex.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hey Everyone,

 

I am looking to create conditional formatting on a range of cells that will populate said cells based off of an AQL table. I have attached the excel file that shows the data and what I am trying to do. There is a text box on "TAB 2" that explains the goal of what I am trying to achieve.

 

I believe I will need to use an equation to format the cells but based off prior research into excel functions - I think this formula will need to be a little sophisticated. I believe currently that the formula will need to be some variation of a nested VLookup function or possibly a VLookup nested with an HLookup.

 

NOTE:

The "TABLE" tab lists 'Lot Size' as ranges. Currently I am skeptical about leaving this as a range because I think it will make the equation needed even more complicated (unless this task can be performed using the approximate return of V/HLookup which I am unsure of but thought it has potential). If necessary I am open to creating a table that has one cell per one lot size (i.e. C5=2, C6=3, C7=4, etc.) in order to make this work.

6 Replies

@AnthonyCappuccio 

I'd do that with helper ranges/cells. For the main table

image.png

add percents as numbers, not as texts on the top, and on the left low boundary of ranges.

Here

image.png

in B1 how we interpret ALL, and in C1 formula

=IFERROR(
   --INDEX(TABLE!$D$5:$S$19,
      LOOKUP('TAB 1'!$E$3,TABLE!$A$5:$A$19,(ROW(TABLE!$A$5:$A$19)-ROW(TABLE!$C$4))),
      MATCH('TAB 1'!$E$5,TABLE!$D$3:$S$3,1)),
'TAB 2'!$B$1)

and conditional formatting rule formula as

=(ROW()>ROW($C$2))*(ROW()<=($C$1+ROW($C$2)))

It could be combined al together in one formula, but it will be hard to maintain such.

@AnthonyCappuccio don't forget to update the cells the formatting will apply to in case you have a situation when the value is greater than 20.

 
 
 

Formatting.JPG

 @Sergei Baklan is there a reason why the iferror function should return "Tab2 B1" which has 100,000 as its value? 

@Sergei Baklan 

 

Sergei - Thank you for taking the time to explain this so thoroughly. I am not nearly this experienced in Excel so to come up with this would be near impossible for me. I really do appreciate the help!

 

A few questions:

 

  1. When you say it would be hard to maintain this as one formula are you referring to excel's ability to maintain it and process the formula within the formatting?
  2. Also, I did not mention this on the post but another key aspect of this whole thing is that I need the yellow cells to turn back to white after information is manually inputted. Meaning after the Quantity and AQL are entered on TAB 1, the purpose of this sheet will be for a mechanical inspector to input data into these yellow cells based on a tolerance range for a feature. Upon entering the value into the yellow cell on TAB 2 I would need the cell to then change from yellow to white signifying data has been entered.
  3. Is this an easy addition given the way you had written the formula on the excel file you had provided?

 

@wumolad  Thanks for the heads up. I had taken this into consideration - I didn't want to complicate this example file too much but I definitely will be extending this past 20 pieces!

@wumolad 

No reason except that shall be some number to apply formatting. I know nothing about that business and have no idea that ALL could mean on practice.

@AnthonyCappuccio 

1) It'll be much harder to change the formula and much longer to develop it. If you don't like to have all these additional cells together with main data, such data preparation calculations could be moved on separate sheet (both table helper columns and intermediate calculations) and such sheet could be hided not to show it to end user.

2) Not to color cells with data we may check if the cell is empty or not by one more criteria

=(ROW()>ROW($C$2))*(ROW()<=($C$1+ROW($C$2)))*(C3="")

3) Not sure I understood this question, could you please clarify a bit.

@Sergei Baklan 

Thank you for the suggestion. I will most likely end up adding the formula to the sheet where the table is located as the sheet involving the recording of the feature will have to maintain a certain appearance that will need this hidden.

 

The new formula you updated for #2 was exactly what I was looking for. I was trying to ask you (in question 3) if adding the step about switching from yellow to white when data is entered would be difficult based on what you initially provided but I see now how you included it.

.

.

One question I have regarding ALL:

As I'm messing around with the file you sent I'm noticing when a value for AQL and Quantity are chosen that correlate to "ALL" in the TABLE - this results in all 20 piece #'s flagging yellow. How would I alter this so that "ALL" in the TABLE tab is reflective of the Quantity entered on TAB 1?

 

[for example] The attached filed I added, the Quantity is 5 and AQL is 0.01%. From the table this is defined as ALL and TAB 2 highlights all 20 piece #'s listed on TAB 2. In this case there are only 5 parts in the quantity so ideally only 5 piece #'s would need to be highlighted on TAB 2.

Essentially the connection I am making is if ALL is the chosen cell from the TABLE then the highlighted cells would be reflective of the exact quantity indicated on TAB 1.

 

This is where I mentioned in the original post that I was skeptical about ranges and considered making this table much larger to include one number per lot size in fear of this exact need being to complex.