Use formula to define cell address in reference

%3CLINGO-SUB%20id%3D%22lingo-sub-1413987%22%20slang%3D%22en-US%22%3EUse%20formula%20to%20define%20cell%20address%20in%20reference%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1413987%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EAs%20a%20user%20that%20is%20not%20so%20experience%20with%20excel%20I%20have%20a%20fairly%20simple%20question%2C%20but%20I%20am%20afraid%20that%20answers%20is%20not%20going%20to%20belong%20to%20the%20same%20kind.%3C%2FP%3E%3CP%3EMy%20intentions%20are%20to%20reference%20a%20cell%20in%20a%20table%20to%20a%20cell%20in%20other%20sheet.%20But%20the%20referenced%20on%20other%20sheet%20has%20to%20be%20dynamic%2C%20in%20a%20way%20that%20formula%20will%20%22calculate%22%20address%20of%20the%20cell%20based%20on%20inputs%20in%202%20different%20cells.%3C%2FP%3E%3CP%3EExample%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3D'Scheme%201%20-%20Risk%20Register'!FORMULA%20THAT%20GIVES%20CELL%20ADDRESS%20IN%20TEXT(SUCH%20AS%20D12)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3BMy%20problem%20is%2C%20that%20I%20cannot%20make%20reference%20and%20formula%20work%20together.%20Is%20there%20a%20special%20syntax%20or%20signs%20to%20make%20it%20work%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1413987%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-1414002%22%20slang%3D%22en-US%22%3ERe%3A%20Use%20formula%20to%20define%20cell%20address%20in%20reference%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1414002%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F677908%22%20target%3D%22_blank%22%3E%40Krzysztof_Pe%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThat%20could%20be%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DINDIRECT(%22'Scheme%201%20-%20Risk%20Register'!%22%20%26amp%3B%20D12)%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1414600%22%20slang%3D%22en-US%22%3ERe%3A%20Use%20formula%20to%20define%20cell%20address%20in%20reference%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1414600%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%3BThank%20You%2C%20as%20a%20standalone%20cell%20it%20worked%20just%20right.%20But%20in%20my%20case%20I%20am%20using%20option%20'linked%20picture'%20to%20get%20the%20value%20of%20cell%20together%20with%20formatting.%20When%20I%20am%20trying%20to%20paste%20the%20same%20formula%20into%20the%20'linked%20picture'%20I%20get%20an%20error%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%20'This%20formula%20is%20missing%20a%20range%20reference%20or%20a%20defined%20name'%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3ESo%20to%20sum%20it%20up%2C%20this%20is%20working%20perfectly%20in%20normal%20cell%20(don't%20mind%20the%20long%20substitute%20formula%20I%20can't%20do%20any%20better%20then%20that%20atm.)%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DINDIRECT(%22'Risk%20Analysis%20-%20Matrix'!%22%20%26amp%3B%20(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(E10%2C%221%22%2C%22C%22)%2C%222%22%2C%22D%22)%2C%223%22%2C%22E%22)%2C%224%22%2C%22F%22)%2C%225%22%2C%22G%22))%26amp%3B(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(F10%2C%221%22%2C%2211%22)%2C%222%22%2C%2212%22)%2C%223%22%2C%2213%22)%2C%224%22%2C%2214%22)%2C%225%22%2C%2215%22)))%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3BAnd%20when%20I%20paste%20it%20into%20'linked%20picture'%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Krzysztof_Pe_0-1590316739799.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F194130i3E77DAEBD7965EB0%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Krzysztof_Pe_0-1590316739799.png%22%20alt%3D%22Krzysztof_Pe_0-1590316739799.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EThank%20You%20for%20your%20time%20%3CLI-EMOJI%20id%3D%22lia_slightly-smiling-face%22%20title%3D%22%3Aslightly_smiling_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1414642%22%20slang%3D%22en-US%22%3ERe%3A%20Use%20formula%20to%20define%20cell%20address%20in%20reference%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1414642%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F677908%22%20target%3D%22_blank%22%3E%40Krzysztof_Pe%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20create%20a%20Defined%20Name%20within%20Name%20Manager%20(%3CEM%3EFormulas%3C%2FEM%3E%20tab)%2C%20viz%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CEM%3EName%3C%2FEM%3E%3A%26nbsp%3B%3CFONT%20color%3D%22%230000FF%22%3E%3CSTRONG%3EMyLink%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CEM%3ERefers%20to%3C%2FEM%3E%3A%26nbsp%3B%3CSTRONG%3E%3CFONT%20color%3D%22%230000FF%22%3E%3DINDIRECT(%22'Risk%20Analysis%20-%20Matrix'!%22%20%26amp%3B%20(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(E10%2C%221%22%2C%22C%22)%2C%222%22%2C%22D%22)%2C%223%22%2C%22E%22)%2C%224%22%2C%22F%22)%2C%225%22%2C%22G%22))%26amp%3B(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(F10%2C%221%22%2C%2211%22)%2C%222%22%2C%2212%22)%2C%223%22%2C%2213%22)%2C%224%22%2C%2214%22)%2C%225%22%2C%2215%22)))%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnd%20then%20use%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%230000FF%22%3E%3CSTRONG%3E%3DMyLink%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ewithin%20the%20linked%20picture.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EN.B.%20Do%20the%20values%20in%20E10%20and%20F10%20which%20are%20being%20referenced%20in%20your%20formula%20both%20contain%20%3CSTRONG%3Eintegers%20varying%20from%201%20to%205%3C%2FSTRONG%3E%3F%20If%20so%2C%20you%20can%20shorten%20considerably%20your%20current%20construction%2C%20not%20to%20mention%20make%20it%20non-volatile%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%230000FF%22%3E%3CSTRONG%3E%3DINDEX('Risk%20Analysis%20-%20Matrix'!C11%3AG15%2CF10%2CE10)%26nbsp%3B%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1414731%22%20slang%3D%22en-US%22%3ERe%3A%20Use%20formula%20to%20define%20cell%20address%20in%20reference%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1414731%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F677908%22%20target%3D%22_blank%22%3E%40Krzysztof_Pe%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAnother%20variant%20is%20to%20use%20formula%20for%20any%20cell%20in%20the%20workbook%2C%20as%20variant%20under%20the%20shape%20in%20E3%2C%20and%20shape%20itself%20link%20as%20%3DE3%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1414963%22%20slang%3D%22en-US%22%3ERe%3A%20Use%20formula%20to%20define%20cell%20address%20in%20reference%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1414963%22%20slang%3D%22en-US%22%3E%3CP%3E-ERR%3AREF-NOT-FOUND-%40Sergei%20Baklan%2C%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F676180%22%20target%3D%22_blank%22%3E%40Jos_Woolley%3C%2FA%3E%3C%2FP%3E%3CP%3EUnfortunately%20none%20of%20the%20above%20solutions%20work%20%3CLI-EMOJI%20id%3D%22lia_disappointed-face%22%20title%3D%22%3Adisappointed_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FP%3E%3CP%3EIt%20always%20comes%20down%20to%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3E'This%20formula%20is%20missing%20a%20range%20reference%20or%20a%20defined%20name'%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EIt%20just%20seems%20like%20'Linked%20Picture'%20doesn't%20like%20any%20kind%20of%20formulas%20inside%20its%20code.%3C%2FP%3E%3CP%3EThis%20is%20very%20smart%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DINDEX('Risk%20Analysis%20-%20Matrix'!C11%3AG15%2CF10%2CE10)%20%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EThank%20You%20for%20that%2C%20it%20will%20definitely%20come%20in%20handy%2C%20but%20it%20gives%20wrong%20values%20tho.%3C%2FP%3E%3CP%3EIf%20I%20feed%20it%20with%20numbers%20'2'%20and%20'5'%20it%20gives%20me%2020%20which%20is%20wrong%20since%20the%20outcome%20is%20always%20multiplication%20of%202%20digits%20provided%20(But%20color%20is%20not%20always%20the%20same%20for%202%20equal%20outcomes).%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Matrix.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F194156i25EA182E99AB3340%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Matrix.png%22%20alt%3D%22Matrix.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EUpon%20linking%20it%20as%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%3Bmentioned%20the%20'Linked%20Picture'%2C%20since%20it%20is%20linked%20to%20cell%20'under%20it'%2C%20is%20taking%20its%20formatting%20instead%20of%20formatting%20of%20the%20cell%20that%20is%20calculated%20by%20it.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Risk%20Analysis.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F194157iE5DB090148E6AA9A%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Risk%20Analysis.png%22%20alt%3D%22Risk%20Analysis.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EAnyway%2C%20I%20figured%20that%20doing%20formatting%20manually%20will%20be%20just%20easier%20and%20faster%20in%20this%20case%20at%20least.%3C%2FP%3E%3CP%3EBut%20in%20case%20any%20of%20You%20still%20want%20to%20try%20and%20crack%20it%20for%20me%20or%20for%20yourselves%20I%20will%20attach%20excel%20file%20to%20this%20post.%20In%20short%20the%20table%20in%20sheet%20'Scheme%201%20-%20Risk%20Register'%20is%20taking%202%20variables%20under%20consideration%20to%20assume%20risk%20level%20of%20activity.%20On%20first%20sheet%20there%20is%20a%205x5%20matrix%20that%20defines%20the%20combination%20of%20the%202%20variables.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20You%20for%20your%20time%20guys%2C%20I%20appreciate%20quick%20help%20a%20lot%20and%20a%20nice%20welcome%20%3CLI-EMOJI%20id%3D%22lia_slightly-smiling-face%22%20title%3D%22%3Aslightly_smiling_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1415004%22%20slang%3D%22en-US%22%3ERe%3A%20Use%20formula%20to%20define%20cell%20address%20in%20reference%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1415004%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F677908%22%20target%3D%22_blank%22%3E%40Krzysztof_Pe%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20may%20definitely%20simplify%20risk%20level%20formula%20as%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DINDEX('Risk%20Analysis%20-%20Matrix'!%24C%2411%3A%24G%2415%2C%24F10%2C%24E10)%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Ebut%20I%20didn't%20catch%20what%20is%20the%20logic%20for%20the%20color%20of%20cells%20(in%20your%20sample%20it's%20not%20the%20same%20as%20in%20risk%20matrix)%20and%20what%20is%20the%20logic%20for%20the%20pictures%20in%20next%20column%2C%20what%20shall%20they%20show.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1415007%22%20slang%3D%22en-US%22%3ERe%3A%20Use%20formula%20to%20define%20cell%20address%20in%20reference%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1415007%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%3BI%20just%20showed%20the%20pictured%20next%20to%20the%20cell%20it%20takes%20information%20from%2C%20normally%20as%20you%20suggested%20it%20would%20be%20on%20top%20of%20it.%3C%2FP%3E%3CP%3EI%20did%20it%20to%20show%20that%20it%20takes%20format%20from%20the%20cell%20it%20refers%20to%2C%20so%20in%20this%20case%20for%20example%2010%20with%20green%20background%20instead%20of%20the%20calculated%20cell%20which%20is%2010%20with%20red%20background%20in%20the%20matrix.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETo%20put%20it%20short%20I%20want%20the%20cells%20under%20'Risk%20Level'%20Column%20to%20take%20Value%20and%20formatting%20from%20Matrix%20based%20on%20variables%20likelihood%20and%20consequences.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1415014%22%20slang%3D%22en-US%22%3ERe%3A%20Use%20formula%20to%20define%20cell%20address%20in%20reference%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1415014%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F677908%22%20target%3D%22_blank%22%3E%40Krzysztof_Pe%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20color%20is%20from%20matrix%2C%20consequence%3D5%20and%20likelihood%3D2%20shall%20have%20red%20color%2C%20correct%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1415019%22%20slang%3D%22en-US%22%3ERe%3A%20Use%20formula%20to%20define%20cell%20address%20in%20reference%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1415019%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%3BYes%2C%20this%20is%20correct%2C%20In%20the%20picture%20I%20sent%20I%20set%20it%20manually%20to%20green%20for%20you%20to%20see%20difference%20and%20from%20where%20the%20'Linked%20Picture'%20takes%20information.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1415030%22%20slang%3D%22en-US%22%3ERe%3A%20Use%20formula%20to%20define%20cell%20address%20in%20reference%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1415030%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F677908%22%20target%3D%22_blank%22%3E%40Krzysztof_Pe%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhen%20we%20may%20apply%20conditional%20formatting%20rules%20as%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%20677px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F194161i4CA39368000CCEA7%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%3EFormulas%20for%20rules%20are%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3EGreen%3A%0A%3D(%24E10%26lt%3B%3D2)*(%24F10%26lt%3B%3D2)%2B(%24E10%3D1)*(%24F10%3D3)%0A%0ARed%3A%0A%3D(%24E10%3D5)%2B(%24E10%3D4)*(%24F10%26gt%3B2)%2B(%24E10%3D3)*(%24F10%26gt%3B3)%2B(%24E10%3D2)*(%24F10%3D5)%0A%0AYellow%20(all%20the%20rest)%3A%0A%3D(%24E10%26gt%3B0)*(%24F10%26gt%3B0)*(%24E10%26lt%3B6)*(%24F10%26lt%3B6)%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3ESmall%20minus%20is%20-%20if%20you%20change%20colors%20in%20matrix%2C%20rules%20formulas%20are%20to%20be%20updated%20for%20conditional%20formatting.%20But%20I%20guess%20the%20matrix%20is%20not%20so%20dynamic.%3C%2FP%3E%0A%3CP%3EIn%20general%2C%20it%20could%20be%20one%20set%20of%20formulas%20to%20color%20both%20matrix%20and%20column%2C%20or%20just%20create%20helper%20range%20which%20will%20indicate%20colors%20to%20apply%20by%20values.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1415127%22%20slang%3D%22en-US%22%3ERe%3A%20Use%20formula%20to%20define%20cell%20address%20in%20reference%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1415127%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%3BYeah%2C%20that%20did%20the%20trick.%20The%20Matrix%20will%20always%20stay%20the%20same%2C%20so%20there%20is%20no%20problem%20with%20updating%20formatting.%20Thank%20You%20guys%20for%20your%20time%20%3CLI-EMOJI%20id%3D%22lia_slightly-smiling-face%22%20title%3D%22%3Aslightly_smiling_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1415133%22%20slang%3D%22en-US%22%3ERe%3A%20Use%20formula%20to%20define%20cell%20address%20in%20reference%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1415133%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F677908%22%20target%3D%22_blank%22%3E%40Krzysztof_Pe%3C%2FA%3E%26nbsp%3B%2C%20glad%20to%20help%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

Hi,

As a user that is not so experience with excel I have a fairly simple question, but I am afraid that answers is not going to belong to the same kind.

My intentions are to reference a cell in a table to a cell in other sheet. But the referenced on other sheet has to be dynamic, in a way that formula will "calculate" address of the cell based on inputs in 2 different cells.

Example:

 

='Scheme 1 - Risk Register'!FORMULA THAT GIVES CELL ADDRESS IN TEXT(SUCH AS D12)

 

 My problem is, that I cannot make reference and formula work together. Is there a special syntax or signs to make it work?

12 Replies
Highlighted

@Krzysztof_Pe 

That could be

=INDIRECT("'Scheme 1 - Risk Register'!" & D12)
Highlighted

@Sergei Baklan Thank You, as a standalone cell it worked just right. But in my case I am using option 'linked picture' to get the value of cell together with formatting. When I am trying to paste the same formula into the 'linked picture' I get an error:

 'This formula is missing a range reference or a defined name'

So to sum it up, this is working perfectly in normal cell (don't mind the long substitute formula I can't do any better then that atm.):

=INDIRECT("'Risk Analysis - Matrix'!" & (SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(E10,"1","C"),"2","D"),"3","E"),"4","F"),"5","G"))&(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(F10,"1","11"),"2","12"),"3","13"),"4","14"),"5","15")))

 And when I paste it into 'linked picture':

Krzysztof_Pe_0-1590316739799.png

Thank You for your time

Highlighted

@Krzysztof_Pe 

 

So create a Defined Name within Name Manager (Formulas tab), viz:

 

NameMyLink

Refers to=INDIRECT("'Risk Analysis - Matrix'!" & (SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(E10,"1","C"),"2","D"),"3","E"),"4","F"),"5","G"))&(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(F10,"1","11"),"2","12"),"3","13"),"4","14"),"5","15")))

 

And then use

 

=MyLink

 

within the linked picture.

 

N.B. Do the values in E10 and F10 which are being referenced in your formula both contain integers varying from 1 to 5? If so, you can shorten considerably your current construction, not to mention make it non-volatile:

 

=INDEX('Risk Analysis - Matrix'!C11:G15,F10,E10) 

 

Regards

Highlighted

@Krzysztof_Pe 

Another variant is to use formula for any cell in the workbook, as variant under the shape in E3, and shape itself link as =E3

Highlighted

@Sergei Baklan,

@Jos_Woolley

Unfortunately none of the above solutions work

It always comes down to:

'This formula is missing a range reference or a defined name'

It just seems like 'Linked Picture' doesn't like any kind of formulas inside its code.

This is very smart:

=INDEX('Risk Analysis - Matrix'!C11:G15,F10,E10) 

Thank You for that, it will definitely come in handy, but it gives wrong values tho.

If I feed it with numbers '2' and '5' it gives me 20 which is wrong since the outcome is always multiplication of 2 digits provided (But color is not always the same for 2 equal outcomes).

Matrix.png

 

Upon linking it as @Sergei Baklan mentioned the 'Linked Picture', since it is linked to cell 'under it', is taking its formatting instead of formatting of the cell that is calculated by it.

Risk Analysis.png

Anyway, I figured that doing formatting manually will be just easier and faster in this case at least.

But in case any of You still want to try and crack it for me or for yourselves I will attach excel file to this post. In short the table in sheet 'Scheme 1 - Risk Register' is taking 2 variables under consideration to assume risk level of activity. On first sheet there is a 5x5 matrix that defines the combination of the 2 variables.

 

Thank You for your time guys, I appreciate quick help a lot and a nice welcome

Highlighted

@Krzysztof_Pe 

You may definitely simplify risk level formula as

 

=INDEX('Risk Analysis - Matrix'!$C$11:$G$15,$F10,$E10)

 

but I didn't catch what is the logic for the color of cells (in your sample it's not the same as in risk matrix) and what is the logic for the pictures in next column, what shall they show.

Highlighted

@Sergei Baklan I just showed the pictured next to the cell it takes information from, normally as you suggested it would be on top of it.

I did it to show that it takes format from the cell it refers to, so in this case for example 10 with green background instead of the calculated cell which is 10 with red background in the matrix.

 

To put it short I want the cells under 'Risk Level' Column to take Value and formatting from Matrix based on variables likelihood and consequences.

Highlighted

@Krzysztof_Pe 

If color is from matrix, consequence=5 and likelihood=2 shall have red color, correct?

Highlighted

@Sergei Baklan Yes, this is correct, In the picture I sent I set it manually to green for you to see difference and from where the 'Linked Picture' takes information.

Highlighted

@Krzysztof_Pe 

When we may apply conditional formatting rules as

image.png

Formulas for rules are

Green:
=($E10<=2)*($F10<=2)+($E10=1)*($F10=3)

Red:
=($E10=5)+($E10=4)*($F10>2)+($E10=3)*($F10>3)+($E10=2)*($F10=5)

Yellow (all the rest):
=($E10>0)*($F10>0)*($E10<6)*($F10<6)

Small minus is - if you change colors in matrix, rules formulas are to be updated for conditional formatting. But I guess the matrix is not so dynamic.

In general, it could be one set of formulas to color both matrix and column, or just create helper range which will indicate colors to apply by values.

Highlighted

@Sergei Baklan Yeah, that did the trick. The Matrix will always stay the same, so there is no problem with updating formatting. Thank You guys for your time

Highlighted