SOLVED

Cell settings

%3CLINGO-SUB%20id%3D%22lingo-sub-1462130%22%20slang%3D%22en-US%22%3ECell%20settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1462130%22%20slang%3D%22en-US%22%3E%3CP%3EDear%2C%20I%20have%20a%20formula%20in%20excel%2C%20the%20formula%20works%20(below%20the%20full%20formula).%20When%20I%20copy%20this%20formula%20to%20certain%20cells%20of%20my%20sheet%20than%20I%20get%20%23values!%20back.%20I%20know%20excel%20quiet%20a%20bit%2C%20but%20can't%20figure%20this%20one%20out%2C%20takes%20me%20hours%20already%20%3A).%26nbsp%3BFormat%20Cell%20is%20set%20to%20'General'%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E'%3Dmin(if(range%3D%22text%22%3Bvalues))%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20use%20Microsoft%20Office%20Professional%20Plus%202019%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20your%20support.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1462130%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1462145%22%20slang%3D%22en-US%22%3ERe%3A%20Cell%20settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1462145%22%20slang%3D%22en-US%22%3E%3CP%3EWhen%20I%20click%20on%20the%20fx%20button%2C%20Excel%20says%20that%20the%20formula%20result%20is%2010.%20Which%20is%20the%20outcome%20of%20my%20formula%20and%20is%20correct.%20Still%20the%20cell%20returns%20%23value!.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1462168%22%20slang%3D%22en-US%22%3ERe%3A%20Cell%20settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1462168%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F699054%22%20target%3D%22_blank%22%3E%40michiel1982%3C%2FA%3E%26nbsp%3BSome%20suggestions%3A%3C%2FP%3E%3CP%3E1.%26nbsp%3B%3CSPAN%3E%3Dmin(if(range%3D%22text%22%3CFONT%20color%3D%22%23FF0000%22%3E%3CSTRONG%3E%3B%3C%2FSTRONG%3E%3C%2FFONT%3Evalues))%20%E2%86%92%20Change%20this%20semi-colon%20to%20comma%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E2.%20Are%20you%20using%20absolute%2Fnamed%20range%20or%20relative%20range%3F%20Because%20it%20is%20possible%20when%20you%20copy%20the%20formula%20to%20somewhere%20else%2C%20the%20range%20changes%20if%20it%20is%20not%20fixed%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E3.%20Consider%20using%20MINIFS%20if%20applicable%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E4.%20Look%20like%20you%20use%20a%20range%20(not%20a%20cell)%20in%20IF%20function.%20Perhaps%20you%20must%20use%20array%20formula%20(CTRL%20%2B%20SHIFT%20%2B%20ENTER)%20after%20typing%20in%20the%20formula%20to%20make%20it%20work%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E5.%20Select%20the%20cell%20where%20you%20have%20the%20formula%20with%20error%2C%20go%20to%20Formula%20Tab%2FEvaluate%20formula%2C%20then%20click%20Evaluate%20button%20until%20you%20see%20errors%20showing%20in%20the%20panel.%20It%20would%20help%20you%20audit%20your%20formula%20and%20find%20where%20things%20go%20wrong%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1462786%22%20slang%3D%22en-US%22%3ERe%3A%20Cell%20settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1462786%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20for%20your%20support!%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20tried%20your%20options%2C%20but%20these%20don't%20work%20unfortunately.%20My%20challenge%20is%20that%20in%20one%20cell%20of%20the%20same%20sheet%2C%20the%20formula%20works%20just%20fine.%20When%20I%20copy%20this%20exact%20same%20formula%2C%20using%20the%20exact%20same%20range%2C%20and%20paste%20the%20formula%20in%20a%20different%20cell%2C%20than%20I%20get%20the%20%23value!%20error.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESomething%20seems%20to%20be%20wrong%20with%20the%20settings%20of%20that%20particular%20cell%2C%20but%20I%20can't%20figure%20out%20what%20it%20is.%20I%20also%20copy%20and%20pasted%20the%20cell%20formats.%20When%20I%20open%20a%20new%20sheet%2C%20and%20try%20to%20do%20the%20same%2C%20there%20are%203%20rows%20in%20which%20it%20works%20perfectly%2C%20all%20other%20cells%20give%20this%20error.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20this%20clarifies%20a%20bit%20better%2C%20thanks%20again%2C%20hope%20to%20hear!%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1466541%22%20slang%3D%22en-US%22%3ERe%3A%20Cell%20settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1466541%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F699054%22%20target%3D%22_blank%22%3E%40michiel1982%3C%2FA%3E%26nbsp%3BIt%20seems%20difficult%20to%20imagine%20what%20the%20issue%20is%20without%20actually%20seeing%20your%20example.%20When%20you%20copy%20your%20formula%20to%20another%20cell%20and%20have%20the%20error%2C%20and%20you%20Evaluate%20the%20formula%20(%3CSPAN%3EClick%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EFormulas%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%26gt%3B%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EEvaluate%20Formula%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%26gt%3B%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EEvaluate%3C%2FSTRONG%3E%3CSPAN%3E.%20Excel%20will%20step%20through%20the%20parts%20of%20the%20formula%20individually)%2C%20can%20you%20take%20screenshot%20of%20the%20step%20immediately%20before%20getting%20your%20%23Value%20error%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EYou%20can%20read%20this%20to%20have%20an%20idea%20of%20how%20to%20troubleshoot%20your%20formula%3A%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fsupport.microsoft.com%2Fen-us%2Foffice%2Fhow-to-correct-a-value-error-15e1b616-fbf2-4147-9c0b-0a11a20e409e%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsupport.microsoft.com%2Fen-us%2Foffice%2Fhow-to-correct-a-value-error-15e1b616-fbf2-4147-9c0b-0a11a20e409e%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1467344%22%20slang%3D%22en-US%22%3ERe%3A%20Cell%20settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1467344%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F675276%22%20target%3D%22_blank%22%3E%40hynguyen%3C%2FA%3E%26nbsp%3Bthanks%20for%20your%20support.%20Please%20find%20attached%20two%20print%20screens%20as%20you%20requested.%20Also%2C%20one%20print%20screen%20has%20a%20green%20and%20a%20red%20dot%20in%20it%2C%20the%20red%20dot%20is%20where%20the%20formula%20does%20not%20work%2C%20the%20green%20dot%20is%20where%20the%20formula%20works%20perfectly.%20Hope%20to%20hear%2C%20thanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1467345%22%20slang%3D%22en-US%22%3ERe%3A%20Cell%20settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1467345%22%20slang%3D%22en-US%22%3Eby%20the%20way%2C%20the%20formula%20is%20still%20incorrect%20as%20the%20number%20that%20I%20should%20bet%20in%20return%20is%2010%2C%20not%205.%20But%20that%20is%20something%20else%20to%20figure%20out%20%3CLI-EMOJI%20id%3D%22lia_slightly-smiling-face%22%20title%3D%22%3Aslightly_smiling_face%3A%22%3E%3C%2FLI-EMOJI%3E%20I%20first%20want%20to%20get%20writ%20of%20the%20%23value!%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1469446%22%20slang%3D%22en-US%22%3ERe%3A%20Cell%20settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1469446%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F699054%22%20target%3D%22_blank%22%3E%40michiel1982%3C%2FA%3E%26nbsp%3BThe%20screenshot%20makes%20the%20troubleshooting%20much%20easier.%20I%20guess%20you%20want%20to%20find%20the%20lowest%20value%20in%20column%20K%20if%20column%20H%20matches%20your%20desired%20product%20%22Paper%22.%20Because%20you%20use%20a%20range%20in%20IF%20statement%20instead%20of%20a%20single%20cell%2C%20you%20will%20have%20to%20use%20CTRL%20%2B%20SHIFT%20%2B%20ENTER%20after%20typing%20your%20formula%20(while%20your%20cursor%20remains%20in%20the%20cell)%20so%20that%20there%20is%20curly%20bracket%20%7B%20%7D%20wrapping%20around%20your%20formula%20to%20make%20it%20an%20array%20one.%3C%2FP%3E%3CP%3EPlease%20see%20the%20screenshot.%20Just%20a%20single%20Min(if)%20array%20formula%20should%20return%20your%20desired%20outcome.%20Note%20that%20I%20test%20with%20adding%20another%20Paper%20at%20the%20end%20of%20the%20range%20to%20see%20if%20it%20returns%20the%20right%20result.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Arrayformula.png%22%20style%3D%22width%3A%20543px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F199141iD2D38B25395CF403%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Arrayformula.png%22%20alt%3D%22Arrayformula.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20have%20MINIFS%20function%20available%20in%20Excel%2C%20I%20suggest%20you%20use%20it%20instead%20of%20array%20formula.%20See%20its%20use%20in%20the%20below%20screenshot%20with%20same%20result%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22MinIf%20formula.png%22%20style%3D%22width%3A%20517px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F199142iE8C937ECFD98570A%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22MinIf%20formula.png%22%20alt%3D%22MinIf%20formula.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1479689%22%20slang%3D%22en-US%22%3ERe%3A%20Cell%20settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1479689%22%20slang%3D%22en-US%22%3E%3CP%3EAwesome!%20this%20works%2C%20thank%20you%20so%20much!%20I%20highly%20appreciate%20your%20support.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1479712%22%20slang%3D%22en-US%22%3ERe%3A%20Cell%20settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1479712%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F675276%22%20target%3D%22_blank%22%3E%40hynguyen%3C%2FA%3E%26nbsp%3BDear%2C%20one%20more%20formula%20you%20might%20be%20able%20to%20help%20me%20with.%20Please%20see%20the%20added%20file.%20Here%20you%20see%20my%20file%20and%20I%20have%20described%20how%20I%20need%20to%20setup%20the%20formula.%20Another%20'if'%20needs%20to%20be%20added%20to%20the%20formula%2C%26nbsp%3B%20but%20this%20is%20a%20bit%20challenging%20for%20me.%20Hope%20you%20can%20help.%20Thanks%20again.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1479843%22%20slang%3D%22en-US%22%3ERe%3A%20Cell%20settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1479843%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F699054%22%20target%3D%22_blank%22%3E%40michiel1982%3C%2FA%3E%26nbsp%3BI%20can%20definitely%20help%20if%20you%20can%20clarify%20your%20requirement.%20Do%20you%20mean%20you%20want%20to%20have%20a%20formula%20in%20cell%20C9%20%22Sell%20paper%22%2C%20which%20would%20show%3A%3C%2FP%3E%3CP%3E-%20the%20lowest%20price%20in%20G10%3AG14%20if%20cell%20B9%20%22Current%20price%22%20%26lt%3B%20the%20lowest%20price%20in%20the%20range%20G10%3AG14%3F%26nbsp%3B%3C%2FP%3E%3CP%3E-%20the%20current%20price%20in%20cell%20B9%20if%20the%20above%20condition%20is%20not%20met%3F%3C%2FP%3E%3CP%3EIf%20so%2C%20in%20cell%20C9%20%22Sell%20paper%20price%22%20put%20this%20formula%3A%3C%2FP%3E%3CP%3E%3Dif(%24B%249%3CMIN%3E%3C%2FMIN%3E%3C%2FP%3E%3CP%3ESimilarly%2C%20in%20cell%20D9%20%22Buy%20paper%20price%22%20put%20this%20formula%3A%3C%2FP%3E%3CP%3E%3D%20if(%24B%249%26gt%3BMax(%24G%2410%3A%24G%2414)%2CMax(%24G%2410%3A%24G%2414)%2C%24B%249)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20my%20interpretation%20of%20your%20requirement%20is%20not%20correct%2C%20please%26nbsp%3Bgive%20a%20manual%20result%20example%20so%20that%20I%20could%20imagine%20what%20you%20need.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1484702%22%20slang%3D%22en-US%22%3ERe%3A%20Cell%20settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1484702%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F675276%22%20target%3D%22_blank%22%3E%40hynguyen%3C%2FA%3E%26nbsp%3BThanks%20for%20your%20reply.%20But%20I%20see%20now%20that%20I%20haven't%20been%20precise%20enough%20in%20my%20explanation%2C%20my%20apologies.%20It's%20a%20tough%20formula%20to%20describe%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%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20I%20look%20for%3B%20if%20range%20H10%3A15%20says%20'order'%20and%20the%20order%20amount%20in%20G10%3AG15%20is%20larger%20than%20the%20number%20in%20cell%20B9%2C%20than%20the%20'lowest'%20number%20(0.00004)%20of%20the%20larger%20numbers%20(0.00004%20and%200.00005)%20at%20'order'%20should%20return%2C%20in%20this%20example%20the%20result%20will%20be%200.00004000%20(cell%20G12).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20same%20for%20the%20lower%20numbers%2C%20cut%20I%20guess%20that%20this%20would%20be%20an%20easy%20adjustment%20to%20the%20formula%20for%20the%20above%20calculation.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20hope%20this%20makes%20sense.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1484952%22%20slang%3D%22en-US%22%3ERe%3A%20Cell%20settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1484952%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F699054%22%20target%3D%22_blank%22%3E%40michiel1982%3C%2FA%3E%26nbsp%3BGive%20this%20workbook%20a%20try%20by%20playing%20around%20with%20your%20G10%3AH15.%20Currently%20I%20set%20the%20formula%20in%20C9%20to%20return%20B9%20value%20if%20none%20in%20column%20G%20meets%20your%20condition%20of%20being%20an%20order%20with%20lower%20price%20than%20B9.%20Similar%20with%20Buy%20Paper%20in%20D9%20although%20I%20guess%20you%20want%20to%20use%20the%20highest%20of%20the%20lower%20prices%20for%20such%20case.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1487161%22%20slang%3D%22en-US%22%3ERe%3A%20Cell%20settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1487161%22%20slang%3D%22en-US%22%3E%3CP%3EWhere%20did%20you%20learn%20this%20level%20of%20Excel%3F%3F%20I%20thought%20that%20my%20level%20was%20decent....%20I%20know%20that%20all%20formulas%20are%20possible%2C%20but%20I%20just%20don't%20get%20the%20full%20picture%20of%20how%20formulas%20are%20build%20up%2C%20like%20the%20spreadsheet%20you%20sent%20me.%20Great%20stuff.%20I%20will%20go%20ahead%20and%20give%20it%20a%20go.%20May%20any%20more%20questions%20occur%2C%20I%20know%20where%20to%20find%20you%20%3A).%20Thanks%20a%20million%2C%20I%20highly%20appreciate%20your%20support!%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1487200%22%20slang%3D%22en-US%22%3ERe%3A%20Cell%20settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1487200%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F699054%22%20target%3D%22_blank%22%3E%40michiel1982%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EJust%20in%20case%2C%20if%20to%20avoid%20array%20formulas%2C%20that%20could%20be%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3ESell%3A%0A%3DAGGREGATE(15%2C6%2C1%2F(%24G%2410%3A%24G%2415%26gt%3B%24B%249)%2F(%24H%2410%3A%24H%2415%3D%22Order%22)*(%24G%2410%3A%24G%2415)%2C1)%0ABuy%3A%0A%3DAGGREGATE(14%2C6%2C1%2F(%24G%2410%3A%24G%2415%26lt%3B%24B%249)%2F(%24H%2410%3A%24H%2415%3D%22Order%22)*(%24G%2410%3A%24G%2415)%2C1)%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1487201%22%20slang%3D%22en-US%22%3ERe%3A%20Cell%20settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1487201%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F675276%22%20target%3D%22_blank%22%3E%40hynguyen%3C%2FA%3E%26nbsp%3Bone%20question%20though.%20If%20I%20go%20to%20the%20formula%20you%20sent%20me%20and%20press%20F2%20and%20enter.%20Than%20the%20number%20of%20cell%20B9%20returns%3F%20I%20haven't%20made%20any%20changes%20to%20your%20formula%2C%20nor%20have%20I%20made%20any%20changes%20to%20the%20ranges.%20What%20causes%20my%20number%20to%20differ%20from%20yours%3F%20As%20your%20numbers%20are%20the%20correct%20ones%20I%20need%20to%20return%20as%20the%20answer.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1487212%22%20slang%3D%22en-US%22%3ERe%3A%20Cell%20settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1487212%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%3Bthanks%20Sergei%2C%20I%20will%20dive%20into%20this%20one%20too.%20Great%20support%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-1487220%22%20slang%3D%22en-US%22%3ERe%3A%20Cell%20settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1487220%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F699054%22%20target%3D%22_blank%22%3E%40michiel1982%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAfter%20editing%20the%20cell%20with%20formula%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F675276%22%20target%3D%22_blank%22%3E%40hynguyen%3C%2FA%3E%26nbsp%3Bsuggested%20you%20shall%20use%20Ctrl%2BShift%2BEnter%2C%20not%20Enter.%20These%20are%20an%20array%20formulas.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOf%20course%2C%20if%20your%20are%20on%20Excel%20which%20doesn't%20support%20dynamic%20arrays.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1487873%22%20slang%3D%22en-US%22%3ERe%3A%20Cell%20settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1487873%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%3BAwesome.%20I%20add%20to%20my%20toolset%20the%20new%20Aggregate%20function%20today%20thanks%20to%20you.%20Quite%20handy%20I%20think%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F699054%22%20target%3D%22_blank%22%3E%40michiel1982%3C%2FA%3E%26nbsp%3Byes%20my%20formulas%20are%20array%20ones%20so%20you%20need%20to%20press%20Ctrl-Shift-Enter%20while%20your%20cursor%20is%20still%20within%20the%20formula%20cell%20to%20make%20it%20work.%20If%20you%20want%20to%20see%20how%20it%20actually%20works%20step%20by%20step%2C%20I%20recommend%20using%20Evaluate%20Formula%20in%20the%20Formula%20tab%20of%20the%20ribbon.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

Dear, I have a formula in excel, the formula works (below the full formula). When I copy this formula to certain cells of my sheet than I get #values! back. I know excel quiet a bit, but can't figure this one out, takes me hours already :). Format Cell is set to 'General'

 

'=min(if(range="text";values))

 

I use Microsoft Office Professional Plus 2019

 

Thank you for your support. 

18 Replies
Highlighted

When I click on the fx button, Excel says that the formula result is 10. Which is the outcome of my formula and is correct. Still the cell returns #value!. 

 

Highlighted

@michiel1982 Some suggestions:

1. =min(if(range="text";values)) → Change this semi-colon to comma

2. Are you using absolute/named range or relative range? Because it is possible when you copy the formula to somewhere else, the range changes if it is not fixed

3. Consider using MINIFS if applicable

4. Look like you use a range (not a cell) in IF function. Perhaps you must use array formula (CTRL + SHIFT + ENTER) after typing in the formula to make it work

5. Select the cell where you have the formula with error, go to Formula Tab/Evaluate formula, then click Evaluate button until you see errors showing in the panel. It would help you audit your formula and find where things go wrong

Highlighted

Thanks for your support! 

 

I tried your options, but these don't work unfortunately. My challenge is that in one cell of the same sheet, the formula works just fine. When I copy this exact same formula, using the exact same range, and paste the formula in a different cell, than I get the #value! error. 

 

Something seems to be wrong with the settings of that particular cell, but I can't figure out what it is. I also copy and pasted the cell formats. When I open a new sheet, and try to do the same, there are 3 rows in which it works perfectly, all other cells give this error. 

 

Hope this clarifies a bit better, thanks again, hope to hear! 

Highlighted

@michiel1982 It seems difficult to imagine what the issue is without actually seeing your example. When you copy your formula to another cell and have the error, and you Evaluate the formula (Click Formulas > Evaluate Formula > Evaluate. Excel will step through the parts of the formula individually), can you take screenshot of the step immediately before getting your #Value error?

You can read this to have an idea of how to troubleshoot your formula: 

https://support.microsoft.com/en-us/office/how-to-correct-a-value-error-15e1b616-fbf2-4147-9c0b-0a11...

Highlighted

@hynguyen thanks for your support. Please find attached two print screens as you requested. Also, one print screen has a green and a red dot in it, the red dot is where the formula does not work, the green dot is where the formula works perfectly. Hope to hear, thanks!

Highlighted
by the way, the formula is still incorrect as the number that I should bet in return is 10, not 5. But that is something else to figure out I first want to get writ of the #value!
Highlighted
Best Response confirmed by michiel1982 (Occasional Contributor)
Solution

@michiel1982 The screenshot makes the troubleshooting much easier. I guess you want to find the lowest value in column K if column H matches your desired product "Paper". Because you use a range in IF statement instead of a single cell, you will have to use CTRL + SHIFT + ENTER after typing your formula (while your cursor remains in the cell) so that there is curly bracket { } wrapping around your formula to make it an array one.

Please see the screenshot. Just a single Min(if) array formula should return your desired outcome. Note that I test with adding another Paper at the end of the range to see if it returns the right result.

Arrayformula.png

 

If you have MINIFS function available in Excel, I suggest you use it instead of array formula. See its use in the below screenshot with same result:

MinIf formula.png

Highlighted

Awesome! this works, thank you so much! I highly appreciate your support.

Highlighted

@hynguyen Dear, one more formula you might be able to help me with. Please see the added file. Here you see my file and I have described how I need to setup the formula. Another 'if' needs to be added to the formula,  but this is a bit challenging for me. Hope you can help. Thanks again. 

Highlighted

@michiel1982 I can definitely help if you can clarify your requirement. Do you mean you want to have a formula in cell C9 "Sell paper", which would show:

- the lowest price in G10:G14 if cell B9 "Current price" < the lowest price in the range G10:G14? 

- the current price in cell B9 if the above condition is not met?

If so, in cell C9 "Sell paper price" put this formula:

=if($B$9<Min($G$10:$G$14),Min($G$10:$G$14),$B$9)

Similarly, in cell D9 "Buy paper price" put this formula:

= if($B$9>Max($G$10:$G$14),Max($G$10:$G$14),$B$9)

 

If my interpretation of your requirement is not correct, please give a manual result example so that I could imagine what you need.

Highlighted

@hynguyen Thanks for your reply. But I see now that I haven't been precise enough in my explanation, my apologies. It's a tough formula to describe

 

What I look for; if range H10:15 says 'order' and the order amount in G10:G15 is larger than the number in cell B9, than the 'lowest' number (0.00004) of the larger numbers (0.00004 and 0.00005) at 'order' should return, in this example the result will be 0.00004000 (cell G12).

 

The same for the lower numbers, cut I guess that this would be an easy adjustment to the formula for the above calculation. 

 

I hope this makes sense. 

Highlighted

@michiel1982 Give this workbook a try by playing around with your G10:H15. Currently I set the formula in C9 to return B9 value if none in column G meets your condition of being an order with lower price than B9. Similar with Buy Paper in D9 although I guess you want to use the highest of the lower prices for such case.

 

Highlighted

Where did you learn this level of Excel?? I thought that my level was decent.... I know that all formulas are possible, but I just don't get the full picture of how formulas are build up, like the spreadsheet you sent me. Great stuff. I will go ahead and give it a go. May any more questions occur, I know where to find you :). Thanks a million, I highly appreciate your support! 

Highlighted

@michiel1982 

Just in case, if to avoid array formulas, that could be

Sell:
=AGGREGATE(15,6,1/($G$10:$G$15>$B$9)/($H$10:$H$15="Order")*($G$10:$G$15),1)
Buy:
=AGGREGATE(14,6,1/($G$10:$G$15<$B$9)/($H$10:$H$15="Order")*($G$10:$G$15),1)
Highlighted

@hynguyen one question though. If I go to the formula you sent me and press F2 and enter. Than the number of cell B9 returns? I haven't made any changes to your formula, nor have I made any changes to the ranges. What causes my number to differ from yours? As your numbers are the correct ones I need to return as the answer. 

Highlighted

@Sergei Baklan thanks Sergei, I will dive into this one too. Great support

Highlighted

@michiel1982 

After editing the cell with formula @hynguyen suggested you shall use Ctrl+Shift+Enter, not Enter. These are an array formulas.

 

Of course, if your are on Excel which doesn't support dynamic arrays.

Highlighted

@Sergei Baklan Awesome. I add to my toolset the new Aggregate function today thanks to you. Quite handy I think

@michiel1982 yes my formulas are array ones so you need to press Ctrl-Shift-Enter while your cursor is still within the formula cell to make it work. If you want to see how it actually works step by step, I recommend using Evaluate Formula in the Formula tab of the ribbon.