SOLVED
Home

How to use LOOKUP to refer to tables related to specific ranges of values in a nominated cell

%3CLINGO-SUB%20id%3D%22lingo-sub-359379%22%20slang%3D%22en-US%22%3EHow%20to%20use%20LOOKUP%20to%20refer%20to%20tables%20related%20to%20specific%20ranges%20of%20values%20in%20a%20nominated%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-359379%22%20slang%3D%22en-US%22%3E%3CP%3EI%20want%20to%20modify%20the%20LOOKUP%20entry%20in%20F16%20%2C%26nbsp%3B%3CEM%3E%3CSTRONG%3E%3DLOOKUP(ABS(F14)%2CK6%3AK26%2CL6%3AL26)%3C%2FSTRONG%3E%3C%2FEM%3E%2C%20(24%20shown)%2C%20so%20that%20it%20refers%20to%20and%20selects%20the%20relevant%20column%20and%20value%20from%20Tables%20A%2C%20B%2C%20C%20or%20D%20according%20to%20the%20value%20in%20F8%20(24%20shown).%26nbsp%3B%3C%2FP%3E%3CP%3EI%20want%20it%20to%20use%20Table%20A%20if%20F8%26lt%3B25%2C%20Table%20B%20if%20F8%3D25%2C%26nbsp%3BTable%20C%20if%20F8%26gt%3B25%20and%20%26lt%3B33%2C%26nbsp%3BTable%20D%20if%20F8%26gt%3B32.%26nbsp%3B%3C%2FP%3E%3CP%3EAs%20highlighted%2C%20only%20Table%20A%20is%20referenced%2C%20and%20the%20value%20from%20F14%20(24)%20is%20'read'%20from%20Table%20A%2C%20W13%20(120).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20the%20example%2C%20the%20value%20for%20G8%20is%2025%20and%20the%20values%20should%20be%20read%20from%20Table%20B%2C%20in%20H8%20the%20value%20is%2026%2C%20so%20reference%20should%20be%20made%20to%20Table%20C%20and%20finally%2C%20I8%20(33)%20Table%20D%20should%20be%20referenced.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20correspondents%20who%20play%20Bridge%2C%20the%20scoresheet%20allows%204%20players%20to%20simulate%20a%20competitive%20Teams%20event%20and%20generate%20a%20'Par%20Score'%20to%20compare%20with%20the%20actual%20Duplicate%20result%20at%20the%20table%20-%20an%20improvement%20(I%20feel)%2C%20on%20simply%20using%20Chicago%20scoring.%20(My%20Intellectual%20Copyright)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%2C%3C%2FP%3E%3CP%3EAlf%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F84898i8F4F404B30D72636%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22ParBridge%20Spreadsheet%201445.JPG%22%20title%3D%22ParBridge%20Spreadsheet%201445.JPG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-359379%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-367447%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20use%20LOOKUP%20to%20refer%20to%20tables%20related%20to%20specific%20ranges%20of%20values%20in%20a%20nominated%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-367447%22%20slang%3D%22en-US%22%3EQ.E.D.%3CBR%20%2F%3E%3CBR%20%2F%3E(as%20I%20was%20taught%20at%20school%2070%20years%20ago!)%3CBR%20%2F%3E%3CBR%20%2F%3EMany%20thanks%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-367430%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20use%20LOOKUP%20to%20refer%20to%20tables%20related%20to%20specific%20ranges%20of%20values%20in%20a%20nominated%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-367430%22%20slang%3D%22en-US%22%3EMany%20thanks.%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F280482%22%20target%3D%22_blank%22%3E%40Twifoo%3C%2FA%3E%20gave%20me%20the%20solution.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-367419%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20use%20LOOKUP%20to%20refer%20to%20tables%20related%20to%20specific%20ranges%20of%20values%20in%20a%20nominated%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-367419%22%20slang%3D%22en-US%22%3EMany%20thanks.%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F280482%22%20target%3D%22_blank%22%3E%40Twifoo%3C%2FA%3E%20gave%20me%20a%20solution%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-365175%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20use%20LOOKUP%20to%20refer%20to%20tables%20related%20to%20specific%20ranges%20of%20values%20in%20a%20nominated%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-365175%22%20slang%3D%22en-US%22%3EThe%20formula%20uses%20the%20reference%20form%20of%20INDEX.%20CHOOSE%20returns%20the%20lookup_array%20argument%20of%20MATCH.%20The%20first%20SUM%20returns%20the%20index_num%20argument%20of%20CHOOSE.%20The%20second%20SUM%20returns%20the%20area_num%20argument%20of%20INDEX.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-365053%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20use%20LOOKUP%20to%20refer%20to%20tables%20related%20to%20specific%20ranges%20of%20values%20in%20a%20nominated%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-365053%22%20slang%3D%22en-US%22%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F280482%22%20target%3D%22_blank%22%3E%40Twifoo%3C%2FA%3E%20is%20a%20star!%3CBR%20%2F%3E%3CBR%20%2F%3EThe%20formula%20works%20-%20not%20sure%20how%20-%20but%20it%20works!%26nbsp%3B%20(Now%20my%20intellectual%20challenge%20is%20to%20see%20how%20it%20works.)%3CBR%20%2F%3E%3CBR%20%2F%3EMany%20thanks%20(and%20a%20game%20of%20bridge%20if%20you%20come%20near%20Alcester%20in%20the%20UK!)%3CBR%20%2F%3E%3CBR%20%2F%3EMany%20thanks%20to%20all%20who%20advised.%3CBR%20%2F%3E%3CBR%20%2F%3EAlcesterman%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-365050%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20use%20LOOKUP%20to%20refer%20to%20tables%20related%20to%20specific%20ranges%20of%20values%20in%20a%20nominated%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-365050%22%20slang%3D%22en-US%22%3E%3CP%3ETwifoo%20is%20a%20star!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20formula%20works%20-%20not%20sure%20how%20-%20but%20it%20works!%26nbsp%3B%20(Now%20my%20intellectual%20challenge%20is%20to%20see%20how%20it%20works.)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMany%20thanks%20(and%20a%20game%20of%20bridge%20if%20you%20come%20near%20Alcester%20in%20the%20UK!)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMany%20thanks%20to%20all%20who%20advised.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAlcesterman%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-363764%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20use%20LOOKUP%20to%20refer%20to%20tables%20related%20to%20specific%20ranges%20of%20values%20in%20a%20nominated%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-363764%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20did%20implement%20a%20solution%20but%20I%20had%20overlooked%20the%20fact%20that%20your%20longest%20suit%20length%20etc.%20changed%26nbsp%3B%20as%20the%20vulnerability%20or%20contract%20suit%20changed%20across%20the%20columns.%20%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-363669%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20use%20LOOKUP%20to%20refer%20to%20tables%20related%20to%20specific%20ranges%20of%20values%20in%20a%20nominated%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-363669%22%20slang%3D%22en-US%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F294112%22%20target%3D%22_blank%22%3E%40Alcesterman%3C%2FA%3E%26nbsp%3B%2C%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20the%20attached%20file%2C%20I%20modified%20K27%2C%20V30%2C%20AB30%2C%20AH30%2C%20and%20AN30%20from%2040%2B%20to%2041.%20The%20formula%20in%20F16%2C%20copied%20across%20to%20I16%2C%20is%3A%26nbsp%3B%3C%2FP%3E%3CP%3E%3DINDEX((%24V9%3A%24Z30%2C%24AB9%3A%24AF30%2C%24AH9%3A%24AL30%2C%24AN9%3A%24AR30)%2C%3CBR%20%2F%3EMATCH(F14%2CCHOOSE(SUM(F8%26gt%3B0%2CF8%26gt%3B24%2CF8%26gt%3B25%2CF8%26gt%3B32)%2C%24V9%3A%24V30%2C%24AB9%3A%24AB30%2C%24AH9%3A%24AH30%2C%24AN9%3A%24AN30)%2C1)%2C%3CBR%20%2F%3ECOLUMN(B1)%2CSUM(F8%26gt%3B0%2CF8%26gt%3B24%2CF8%26gt%3B25%2CF8%26gt%3B32))%3C%2FP%3E%3CP%3ECheers!%3C%2FP%3E%3CP%3ETwifoo%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-363332%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20use%20LOOKUP%20to%20refer%20to%20tables%20related%20to%20specific%20ranges%20of%20values%20in%20a%20nominated%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-363332%22%20slang%3D%22en-US%22%3E%3CP%3Efile%20dropbox%20link%3A%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.dropbox.com%2Fs%2F5at72u390w3b7th%2FPAR%2520BRIDGE%2520-%2520PAR%2520SCORE%2520CALCULATOR%25201909.xlsx%3Fdl%3D0%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.dropbox.com%2Fs%2F5at72u390w3b7th%2FPAR%2520BRIDGE%2520-%2520PAR%2520SCORE%2520CALCULATOR%25201909.xlsx%3Fdl%3D0%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAs%20I%20said%2C%20which%20table%20is%20referred%20to%20depends%20on%20the%20value%20in%20cell%20row%208%20(f%2Cg%2Ch%20or%20i)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20the%20value%20in%20cell%26nbsp%3B%20f8%2C%20g8%2C%20h8%20or%20i8%20is%20%26lt%3B25%20%2C%20table%20A%20should%20be%20used%20to%20look%20up%20from%20the%20corresponding%20value%20for%20row%2014%20(f%20to%20i)%3C%2FP%3E%3CP%3EIf%20%3D%2025%2C%20then%20Table%20B%3C%2FP%3E%3CP%3EIf%20in%20range%2026%20-%2032%2C%20then%20Table%20C%3C%2FP%3E%3CP%3Eand%20if%20greater%20or%20equal%20to%2033%2C%20then%20table%20D%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20choice%20of%20which%20column%20is%20used%20(f%2C%20g%2C%20h%20or%20i)%20is%20determined%20by%20the%20user%20(according%20to%20the%20final%20Bridge%20contract%20and%20the%20Bridge%20vulnerability)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20values%20in%20Rows%206%2C%207%2C%2010%20and%2012%20are%20entered%20by%20the%20user.%26nbsp%3B%20Excel%20determines%20the%20'Par%20Value'%20in%2016.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ethe%20User%20enters%20the%20actual%20score%20in%2018%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EExcel%20calculates%20the%20Net%20score%20and%20Looks%20up%20the%20IMPs%20(Internnational%20Match%20Points)%20equivalent%20by%20LOOKUP%20in%20Table%20E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESimple%20concept!%26nbsp%3B%20Not%20so%20simple%20to%20set%20up%20to%20work%20automatically.%26nbsp%3B%20I%20like%20an%20intellectual%20challenge%20and%20appreciate%20the%20help%20I%20am%20getting.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAlf%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-360204%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20use%20LOOKUP%20to%20refer%20to%20tables%20related%20to%20specific%20ranges%20of%20values%20in%20a%20nominated%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-360204%22%20slang%3D%22en-US%22%3EI%20find%20it%20difficult%20to%20decipher%20the%20applicable%20formula%20for%20you.%20Please%20attach%20your%20sample%20Excel%20file.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-359717%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20use%20LOOKUP%20to%20refer%20to%20tables%20related%20to%20specific%20ranges%20of%20values%20in%20a%20nominated%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-359717%22%20slang%3D%22en-US%22%3EMany%20thanks%2C%20This%20looks%20very%20interesting%20(I%20like%20a%20challenge!)%2C%20Alf%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-359716%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20use%20LOOKUP%20to%20refer%20to%20tables%20related%20to%20specific%20ranges%20of%20values%20in%20a%20nominated%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-359716%22%20slang%3D%22en-US%22%3Emany%20thanks%2C%20I%20will%20look%20at%20this.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-359561%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20use%20LOOKUP%20to%20refer%20to%20tables%20related%20to%20specific%20ranges%20of%20values%20in%20a%20nominated%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-359561%22%20slang%3D%22en-US%22%3E%3CP%3EJust%20in%20case%20a%20non-standard%20approach%20is%20of%20interest.%26nbsp%3B%20I%20rely%20entirely%20upon%20defined%20names%20and%20never%20use%20the%20standard%20cell%20referencing%20by%20location.%26nbsp%3B%20My%20first%20step%20would%20be%20to%20build%20a%20defined%20name%20'case'%20that%20will%20indicate%20which%20table%20A-D%20is%20to%20be%20to%20used%20for%20subsequent%20lookups.%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%20134px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F84935iFB38FB8491C8BAFB%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Capture.JPG%22%20title%3D%22Capture.JPG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20definition%20of%20'case'%3C%2FP%3E%3CP%3E%3D%202%20%2B%20SIGN(%20combinedHCP-25)%2B%20(%20combinedHCP%26gt%3B32)%3C%2FP%3E%3CP%3Eis%20a%20bit%20of%20a%20dog%20but%20it%20sets%20the%20scene%20for%20the%20named%20reference%20'table'%20that%20is%20defined%20by%3C%2FP%3E%3CP%3E%3D%20CHOOSE(%20case%2C%20tableA%2C%20tableB%2C%20tableC%2C%20tableD%20)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFrom%20there%20on%2C%20one%20can%20ignore%20the%20fact%20that%204%20tables%20are%20involved%20and%20simple%20build%20the%20lookup%20formula%20as%20if%20'table'%20were%20a%20straightforward%20range%20reference.%26nbsp%3B%20Individual%20column%20names%20can%20be%20defined%20to%20refer%20to%26nbsp%3B%3C%2FP%3E%3CP%3E%3D%20INDEX(%20table%2C%200%2C%201%20)%3C%2FP%3E%3CP%3E%3CEM%3Eetc%3C%2FEM%3E.%20as%20required.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-359385%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20use%20LOOKUP%20to%20refer%20to%20tables%20related%20to%20specific%20ranges%20of%20values%20in%20a%20nominated%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-359385%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAs%20the%20basis%20you%20may%20modify%20your%20formula%20as%3C%2FP%3E%0A%3CPRE%3E%3DLOOKUP(ABS(F14)%2COFFSET(%24K%246%2C0%2C0%2C21)%2COFFSET(%24L%246%2C0%2C0%2C21))%3C%2FPRE%3E%0A%3CP%3EWith%20nested%20IF%20or%20another%20lookup%20find%20on%20how%20many%20columns%20you%20shall%20shift%20your%20ranges%20and%20use%20that%20formula%20instead%20of%20second%20zero%20in%20each%20OFFSET.%20And%20be%20careful%20with%20absolute%20and%20relative%20references.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Alcesterman
Occasional Contributor

I want to modify the LOOKUP entry in F16 , =LOOKUP(ABS(F14),K6:K26,L6:L26), (24 shown), so that it refers to and selects the relevant column and value from Tables A, B, C or D according to the value in F8 (24 shown). 

I want it to use Table A if F8<25, Table B if F8=25, Table C if F8>25 and <33, Table D if F8>32. 

As highlighted, only Table A is referenced, and the value from F14 (24) is 'read' from Table A, W13 (120).

 

In the example, the value for G8 is 25 and the values should be read from Table B, in H8 the value is 26, so reference should be made to Table C and finally, I8 (33) Table D should be referenced.

 

For correspondents who play Bridge, the scoresheet allows 4 players to simulate a competitive Teams event and generate a 'Par Score' to compare with the actual Duplicate result at the table - an improvement (I feel), on simply using Chicago scoring. (My Intellectual Copyright)

 

Thank you,

Alf

 

ParBridge Spreadsheet 1445.JPG

 

14 Replies

Hi,

 

As the basis you may modify your formula as

=LOOKUP(ABS(F14),OFFSET($K$6,0,0,21),OFFSET($L$6,0,0,21))

With nested IF or another lookup find on how many columns you shall shift your ranges and use that formula instead of second zero in each OFFSET. And be careful with absolute and relative references.

Just in case a non-standard approach is of interest.  I rely entirely upon defined names and never use the standard cell referencing by location.  My first step would be to build a defined name 'case' that will indicate which table A-D is to be to used for subsequent lookups.

 

Capture.JPG

 

The definition of 'case'

= 2 + SIGN( combinedHCP-25)+ ( combinedHCP>32)

is a bit of a dog but it sets the scene for the named reference 'table' that is defined by

= CHOOSE( case, tableA, tableB, tableC, tableD )

 

From there on, one can ignore the fact that 4 tables are involved and simple build the lookup formula as if 'table' were a straightforward range reference.  Individual column names can be defined to refer to 

= INDEX( table, 0, 1 )

etc. as required.

 

Many thanks, This looks very interesting (I like a challenge!), Alf
I find it difficult to decipher the applicable formula for you. Please attach your sample Excel file.

file dropbox link: 

 

https://www.dropbox.com/s/5at72u390w3b7th/PAR%20BRIDGE%20-%20PAR%20SCORE%20CALCULATOR%201909.xlsx?dl...

 

As I said, which table is referred to depends on the value in cell row 8 (f,g,h or i)

 

If the value in cell  f8, g8, h8 or i8 is <25 , table A should be used to look up from the corresponding value for row 14 (f to i)

If = 25, then Table B

If in range 26 - 32, then Table C

and if greater or equal to 33, then table D

 

The choice of which column is used (f, g, h or i) is determined by the user (according to the final Bridge contract and the Bridge vulnerability)

 

The values in Rows 6, 7, 10 and 12 are entered by the user.  Excel determines the 'Par Value' in 16.

 

the User enters the actual score in 18

 

Excel calculates the Net score and Looks up the IMPs (Internnational Match Points) equivalent by LOOKUP in Table E

 

Simple concept!  Not so simple to set up to work automatically.  I like an intellectual challenge and appreciate the help I am getting.

 

Alf

Solution

Hello @Alcesterman , 

In the attached file, I modified K27, V30, AB30, AH30, and AN30 from 40+ to 41. The formula in F16, copied across to I16, is: 

=INDEX(($V9:$Z30,$AB9:$AF30,$AH9:$AL30,$AN9:$AR30),
MATCH(F14,CHOOSE(SUM(F8>0,F8>24,F8>25,F8>32),$V9:$V30,$AB9:$AB30,$AH9:$AH30,$AN9:$AN30),1),
COLUMN(B1),SUM(F8>0,F8>24,F8>25,F8>32))

Cheers!

Twifoo

 

I did implement a solution but I had overlooked the fact that your longest suit length etc. changed  as the vulnerability or contract suit changed across the columns.  

Twifoo is a star!

 

The formula works - not sure how - but it works!  (Now my intellectual challenge is to see how it works.)

 

Many thanks (and a game of bridge if you come near Alcester in the UK!)

 

Many thanks to all who advised.

 

Alcesterman

@Twifoo is a star!

The formula works - not sure how - but it works!  (Now my intellectual challenge is to see how it works.)

Many thanks (and a game of bridge if you come near Alcester in the UK!)

Many thanks to all who advised.

Alcesterman
The formula uses the reference form of INDEX. CHOOSE returns the lookup_array argument of MATCH. The first SUM returns the index_num argument of CHOOSE. The second SUM returns the area_num argument of INDEX.
Q.E.D.

(as I was taught at school 70 years ago!)

Many thanks
Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
22 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
cntvertex in Discussions on
13 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies