Using MIN with IF resulting in #VALUE error

Woftae

New Member
Joined
Feb 10, 2018
Messages
24
In a nutshell, I would like to get the lowest value (number) from a range of specified cells but only if the adjacent cell is above the variable value (30%) - (ignoring cells with zero or null)
I am trying to use the following EXCEL MIN function with a multiple conditional IF statements entered into cell V2.
=MIN(IF(AND(ISNUMBER(X2),X2>Variables!A$6),W2,""),IF(AND(ISNUMBER(AA2),AA2>Variables!A$6),Z2,""),IF(AND(ISNUMBER(AD2),AD2>Variables!A$6),AC2,""),IF(AND(ISNUMBER(AG2),AG2>Variables!A$6),AF2,""))

As I only require to include cells if the adjacent cells value IS greater than the variable value (30%), I do not actually require an action on FALSE, but as IF statements require an action if FALSE, I tried setting the FALSE action to "0" but then the MIN returns "0" which is what I don't want.
But if I set the FASLE action to "" (as above) I get a #VALUE error where the value of the adjacent target cell is below the variable value (30%) or Null or a non-number value such as a dash?? - See screen shots attached
I have also modified and tried the formula in various iterations such as with and without the AND statement etc. to try and provide the correct results without success.

Any assistance on this issue from the collective wise will be greatly appreciated - Thanks

1715650087356.png



1715649858201.png
 

Attachments

  • 1715649572227.png
    1715649572227.png
    176.5 KB · Views: 4
  • 1715649617215.png
    1715649617215.png
    99.7 KB · Views: 4

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
It works for me so you must have done something wrong. Don't forget you need to change both ends of the formula in the IF statement.

Book1
ABUVWXYZAAABACADAEAFAG
1
21771.51960.5494001610.2727
3Spill ==>1771E+3001E+3001961E+3001E+3001E+3001E+3001E+3001E+300
4Min only ==>177
5If(Min… ==>177
60.3
Sheet1
Cell Formulas
RangeFormula
V3:AE3V3=IF((X2:AG2<>0)*(X2:AG2>A$6)*(X2:AG2<2),W2:AF2,1E+300)
V4V4=MIN(IF((X2:AG2<>0)*(X2:AG2>A$6)*(X2:AG2<2),W2:AF2,1E+300))
V5V5=IF(MIN(IF((X2:AG2<>0)*(X2:AG2>A$6)*(X2:AG2<2),W2:AF2,1E+300))=1E+300,"-",MIN(IF((X2:AG2<>0)*(X2:AG2>A$6)*(X2:AG2<2),W2:AF2,1E+300)))
Dynamic array formulas.
 
Upvote 0
1715742978186.png


Formula used below
=IF(MIN(IF((X169:AG169<>0)*(X169:AG169>=Variables!A$6)*(X169:AG169<2),W169:AF169,1E+300))=1E+300,"-",MIN(IF((X169:AG169<>0)*(X169:AG169>=Variables!A$6)*(X169:AG169<1),W169:AF169,1E+300)))
 
Upvote 0
:)
Yeah - IFS was a good formula improvement but it doesn't do what I hoped it would when it was first foreshadowed,, which is like:
=IF(Very_long_complex_formula=0, "", &1) where &1 is interpreted by Excel as Very_long_complex_formula.

If you've ever used Unix regular expressions they have that ability.

Glad we got it sorted out.
 
Upvote 0

Forum statistics

Threads
1,216,743
Messages
6,132,464
Members
449,729
Latest member
davelevnt

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top