Display minimum of numbers or text if range criteria is met

nbawa27

New Member
Joined
Jul 28, 2011
Messages
2
=IF(AND(A4:A6>=0,A4:A6<=5,COUNTIF(A4:A6,"NS")),MIN(A4:A6),"NS")

This equation doesn't seem to capture the full logic of what I'm trying to accomplish. In column A, we have a validated data cell where the only allowed values are: 1,3,5, NS. In the column where the above equation fits, I would like the minimum value of the range to be displayed unless all of the range values are "NS". If the range has any combination of values including "NS" and numbers, only the minimum of the numbers should be displayed. Again, the equation should produce "NS" only if all of the range values are "NS".

Any help would be very much appreciated. Thank you in advanced for your efforts!
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Welcome to the Board!

If I follow, try:

Code:
=IF(COUNTIF(A4:A6,"NS")=3,"NS",MIN(A4:A6))

Matty
 
Upvote 0
Matty,

Thank you for the welcome. That is a brilliant solution. I appreciate your prompt and helpful reply. Hope I can repay one soon.
 
Upvote 0
Matty,

Thank you for the welcome. That is a brilliant solution. I appreciate your prompt and helpful reply. Hope I can repay one soon.

Glad I could help.

Matty
 
Upvote 0

Forum statistics

Threads
1,224,570
Messages
6,179,610
Members
452,931
Latest member
The Monk

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