Take the MIN price checking against multiple (more than two) cells

Caly

Board Regular
Joined
Jul 19, 2015
Messages
159
Office Version
  1. 365
  2. 2013
  3. 2011
  4. 2010
  5. 2007
Platform
  1. Windows
Hi I am looking to see if there is a way to write a formula to take the minimum sell price between different cells but only where the margin is okay.

Currently I am writing it out in a long way to look at all cells and if they all say ok then take the MIN value; from there I am writing out all the different possibilities with multiple IF statements.

Is there a shorter way to do this?

Example
Col A Col B. Col C. col D
price 1. Margin. Price 2. Margin
$1 Ok. $2. Not ok

=if(and(B1=“ok”,D1=“Ok”),min(A1,C1),if(and(B1=“ok”,D1<>”Ok”),A1,if(and(B1<>”ok”,D1=“Ok”),C1,”No Go”

But is there a shorter way to write this? If there’s more than 2 criteria it gets very long. Any suggestions?
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Maybe
Excel Formula:
=MIN(IF(B1:D1="Ok",A1:C1))
 
Upvote 0

Forum statistics

Threads
1,214,983
Messages
6,122,598
Members
449,089
Latest member
Motoracer88

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